Package com.lightcrafts.image.metadata.values

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


    }

    public Object getValue(ImageMetadata meta) {
        ImageMetadataDirectory dir = meta.getDirectoryFor(clazz);
        if (dir != null) {
            ImageMetaValue value = dir.getValue(tagID);
            if (value != null) {
                String text = value.toString();
                return text;
            }
        }
        return "";
    }
View Full Code Here


        return LOCALE.get("ExposureLabel");
    }

    public String getValue(ImageMetadata meta) {
        ImageMetadataDirectory dir = meta.getDirectoryFor(CoreDirectory.class);
        ImageMetaValue apertureValue = dir.getValue(CoreTags.CORE_APERTURE);
        ImageMetaValue speedValue = dir.getValue(CoreTags.CORE_SHUTTER_SPEED);
        if ((apertureValue != null) && (speedValue != null)) {
            String value = LOCALE.get(
                "ExposureValue", speedValue.toString(), apertureValue.toString()
            );
            return value;
        }
        return "";
    }
View Full Code Here

        }
        ImageMetadata metaLeft = left.getMetadata(true);
        ImageMetadata metaRight = right.getMetadata(true);

        Class<? extends ImageMetadataDirectory> clazz = CoreDirectory.class;
        ImageMetaValue leftValue = metaLeft.getValue(clazz, tagId);
        ImageMetaValue rightValue = metaRight.getValue(clazz, tagId);

        if (leftValue != null && rightValue != null) {
            if (! reverse) {
                int comp = leftValue.compareTo(rightValue);
                if (comp == 0) {
                    comp = compareNames(left, right);
                }
                return comp;
            }
            else {
                int comp = rightValue.compareTo(leftValue);
                if (comp == 0) {
                    comp = compareNames(left, right);
                }
                return comp;
            }
View Full Code Here

        }
        ImageMetadata metaLeft = left.getMetadata(true);
        ImageMetadata metaRight = right.getMetadata(true);

        Class<? extends ImageMetadataDirectory> clazz = CoreDirectory.class;
        ImageMetaValue leftValue = metaLeft.getValue(clazz, CORE_FILE_NAME);
        ImageMetaValue rightValue = metaRight.getValue(clazz, CORE_FILE_NAME);

        if (leftValue != null && rightValue != null) {
            if (! reverse) {
                int comp = leftValue.compareTo(rightValue);
                return comp;
            }
            else {
                int comp = rightValue.compareTo(leftValue);
                return comp;
            }
        }
        else if ((leftValue != null) && (rightValue == null)) {
            return reverse ? -1 : +1;
View Full Code Here

        String path = file.getParent();
        if (path == null) {
            path = "";
        }
        ImageMetaValue pathValue = new StringMetaValue(path);
        core.putValue(CORE_DIR_NAME, pathValue);

        String name = file.getName();
        ImageMetaValue nameValue = new StringMetaValue(name);
        core.putValue(CORE_FILE_NAME, nameValue);

        long length = file.length();
        ImageMetaValue lengthValue = new UnsignedLongMetaValue(length);
        core.putValue(CORE_FILE_SIZE, lengthValue);

        long time = file.lastModified();
        ImageMetaValue timeValue = new DateMetaValue(time);
        core.putValue(CORE_FILE_DATE_TIME, timeValue);

        return meta;
    }
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.