Package com.lightcrafts.image.metadata.values

Examples of com.lightcrafts.image.metadata.values.ImageMetaValue


    /**
     * {@inheritDoc}
     */
    public String getCopyright() {
        final ImageMetaValue value = getValue( TIFF_COPYRIGHT );
        return value != null ? value.getStringValue() : null;
    }
View Full Code Here


    /**
     * {@inheritDoc}
     */
    public String getFlash() {
        final ImageMetaValue flashValue = getValue( TIFF_FLASH );
        return hasTagValueLabelFor( flashValue );
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public int getImageHeight() {
        final ImageMetaValue value = getValue( TIFF_IMAGE_LENGTH );
        return value != null ? value.getIntValue() : 0;
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public int getImageWidth() {
        final ImageMetaValue value = getValue( TIFF_IMAGE_WIDTH );
        return value != null ? value.getIntValue() : 0;
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public ImageOrientation getOrientation() {
        final ImageMetaValue value = getValue( TIFF_ORIENTATION );
        if ( value != null )
            try {
                return ImageOrientation.getOrientationFor( value.getIntValue() );
            }
            catch ( IllegalArgumentException e ) {
                // ignore
            }
        return ORIENTATION_UNKNOWN;
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public int getRating() {
        final ImageMetaValue rating = getValue( TIFF_MS_RATING );
        return rating != null ? rating.getIntValue() : 0;
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public double getResolution() {
        final ImageMetaValue res = getValue( TIFF_X_RESOLUTION );
        return res != null ? res.getDoubleValue() : 0;
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public int getResolutionUnit() {
        final ImageMetaValue unit = getValue( TIFF_RESOLUTION_UNIT );
        if ( unit != null ) {
            switch ( unit.getIntValue() ) {
                case TIFF_RESOLUTION_UNIT_CM:
                    return RESOLUTION_UNIT_CM;
                case TIFF_RESOLUTION_UNIT_INCH:
                    return RESOLUTION_UNIT_INCH;
            }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public float getShutterSpeed() {
        boolean isAPEX = false;
        ImageMetaValue value = getValue( TIFF_EXPOSURE_TIME );
        if ( value == null ) {
            value = getValue( TIFF_SHUTTER_SPEED_VALUE );
            isAPEX = true;
        }
        if ( !(value instanceof RationalMetaValue) )
            return 0;
        if ( isAPEX )
            return EXIFDirectory.calcShutterSpeedFromAPEX( value );
        return value.getFloatValue();
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public String getTitle() {
        final ImageMetaValue value = getValue( TIFF_DOCUMENT_NAME );
        return value != null ? value.getStringValue() : null;
    }
View Full Code Here

TOP

Related Classes of com.lightcrafts.image.metadata.values.ImageMetaValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.