Package com.lightcrafts.image.metadata

Examples of com.lightcrafts.image.metadata.ImageMetadata$ProviderComparator


    }

    // If the file is a saved document, show the dimensions of the original
    // image.  Otherwise, show the image dimensions of the file itself.
    public String getValue(ImageMetadata meta) {
        ImageMetadata origMeta = getOriginalImageMetadata(meta);
        if (origMeta != null) {
            return getDimensionText(origMeta);
        }
        else {
            return getDimensionText(meta);
View Full Code Here


        tables.clear();

        add(new PaneTitle(LOCALE.get("MetadataTitle")));

        ImageMetadata meta = null;
        try {
            meta = info.getMetadata();
        }
        catch (Throwable t) {
            // BadImageFileException, IOException, UnknownImageTypeException
            t.printStackTrace();
        }
        if (meta == null) {
            String no = LOCALE.get("NoLabel");
            JLabel label = new JLabel(no);
            label.setAlignmentX(.5f);
            add(Box.createVerticalGlue());
            add(label);
            add(Box.createVerticalGlue());
            error = true;
            return;
        }
        Collection<ImageMetadataDirectory> directories =
            meta.getDirectories();
        if (directories.isEmpty()) {
            String empty = LOCALE.get("EmptyLabel");
            JLabel label = new JLabel(empty);
            label.setAlignmentX(.5f);
            add(Box.createVerticalGlue());
View Full Code Here

        }
        return null;
    }

    private static ImageInfo getImageInfo(Document doc) {
        final ImageMetadata meta = doc.getMetadata();
        final File file = meta.getFile();
        return ImageInfo.getInstanceFor(file);
    }
View Full Code Here

        if (dirty) {
            sb.append("* ");
        }
        if (doc != null) {
            File file = doc.getFile();
            ImageMetadata meta = doc.getMetadata();
            if (file == null) {
                file = meta.getFile();
            }
            String name = file.getName();
            String imageName = meta.getFile().getName();
            if (! name.equals(imageName)) {
                name = name + " [" + imageName + "]";
            }
            sb.append(name);
            ScaleModel scaleModel = doc.getScaleModel();
View Full Code Here

        }
    }

    public void run() {
        // First initialize metadata, if it's not already read.
        ImageMetadata meta = datum.getMetadata(true);

        RenderedImage image = null;

        // If there's a file cache entry, use that.
        if (!datum.isBadFile() && cache != null) {
View Full Code Here

    private enum LznEncoding { LZN, JPEG, TIFF_Sidecar, TIFF_Multilayer }

    // Figure out the type of LZN encoding used in the given ImageDatum, or
    // return null if this ImageDatum does not contain any readable LZN data.
    private static LznEncoding getLznEncoding(ImageDatum datum) {
        ImageMetadata meta = datum.getMetadata(true);
        ImageType type = meta.getImageType();
        if (type instanceof LZNImageType) {
            return LznEncoding.LZN;
        }
        if (type instanceof SidecarJPEGImageType) {
            return LznEncoding.JPEG;
View Full Code Here

            left = leftLeader;
        }
        if (rightLeader != null) {
            right = rightLeader;
        }
        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) {
View Full Code Here

            left = leftLeader;
        }
        if (rightLeader != null) {
            right = rightLeader;
        }
        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;
View Full Code Here

    // Construct a lightweight placeholder ImageMetadata object from
    // information in the File.
    static ImageMetadata getEggMetadata(File file) {

        ImageMetadata meta = new ImageMetadata();

        ImageMetadataDirectory core =
            meta.getDirectoryFor(CoreDirectory.class, true);

        String path = file.getParent();
        if (path == null) {
            path = "";
        }
View Full Code Here

TOP

Related Classes of com.lightcrafts.image.metadata.ImageMetadata$ProviderComparator

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.