Examples of ImageMetadata


Examples of com.lightcrafts.image.metadata.ImageMetadata

    }

    public static void reOpen(ComboFrame frame) {
        Document doc = frame.getDocument();
        File file = doc.getFile();
        ImageMetadata meta = doc.getMetadata();
        OtherApplication otherApp = (OtherApplication) doc.getSource();
        if (file != null) {
            open(file, frame, otherApp);
        }
        else {
            open(meta.getFile(), frame, otherApp);
        }
    }
View Full Code Here

Examples of com.lightcrafts.image.metadata.ImageMetadata

                        return null;
                    }
                    hunted = true;
                }
                ImageInfo imageFileInfo = ImageInfo.getInstanceFor(imageFile);
                ImageMetadata meta = imageFileInfo.getMetadata();

                // Read the saved document:
                doc = new Document(xml, meta, info, cancel);
                if (hunted) {
                    doc.markDirty();
                }
            }
            DocumentDatabase.addDocumentFile(file);
        }
        else {
            // Maybe it's an image:
            ImageInfo info = ImageInfo.getInstanceFor(file);
            ImageMetadata meta = info.getMetadata();
            ImageType type = info.getImageType();

            // Maybe set up a template with default tools:
            XmlDocument xml = null;
View Full Code Here

Examples of com.lightcrafts.image.metadata.ImageMetadata

        // If it's somehow a saved document:
        if (interp != null) {
            if (interp.imageFile != null) {
                ImageInfo imageFileInfo =
                    ImageInfo.getInstanceFor(interp.imageFile);
                ImageMetadata meta = imageFileInfo.getMetadata();
                doc = new Document(interp.xml, meta, interp.info, null);
            }
            else {
                // Maybe an LZT.  Trigger the MissingImageFileException.
                doc = new Document(interp.xml);
            }
            DocumentDatabase.addDocumentFile(file);
        }
        else {
            // Maybe it's an image:
            ImageInfo info = ImageInfo.getInstanceFor(file);
            ImageMetadata meta = info.getMetadata();
            ImageType type = info.getImageType();

            // Maybe set up a template with default tools:
            XmlDocument xml = null;
View Full Code Here

Examples of com.lightcrafts.image.metadata.ImageMetadata

    // New Documents created from RAW files get a "RAW Adjustments" singleton
    // tool, if they don't have one already.  These tools can not be part of
    // the default RAW templates, because the tool's initial state depends on
    // the image itself.
    private static void maybeAddRawAdjustments(Document doc) {
        ImageMetadata meta = doc.getMetadata();
        ImageType type = meta.getImageType();
        if (type instanceof RawImageType) {
            if (! doc.hasRawAdjustments()) {
                Engine engine = doc.getEngine();
                OperationType rawType = engine.getRawAdjustmentsOperationType();
                Editor editor = doc.getEditor();
View Full Code Here

Examples of com.lightcrafts.image.metadata.ImageMetadata

        }
    }

    public static boolean export(ComboFrame frame, Document doc) {
        ImageExportOptions oldOptions = doc.getExportOptions();
        ImageMetadata meta = doc.getMetadata();
        final Engine engine = doc.getEngine();
        Dimension size = engine.getNaturalSize();

        ImageExportOptions newOptions;
        if (oldOptions != null) {
View Full Code Here

Examples of com.lightcrafts.image.metadata.ImageMetadata

            XmlDocument xml = new XmlDocument("Template")// See Document()
            XmlNode root = xml.getRoot();
            doc.saveTemplate(root);

            SaveTemplateDialog dialog = new SaveTemplateDialog();
            ImageMetadata meta = doc.getMetadata();
            key = dialog.showDialog(meta, xml, namespace, frame);
            if (key == null) {
                // Dialog was disposed, or the user cancelled.
                return null;
            }
View Full Code Here

Examples of com.lightcrafts.image.metadata.ImageMetadata

    }

    static SaveOptions getSaveOptions(Document doc) {
        SaveOptions options = doc.getSaveOptions();
        if (options == null) {
            ImageMetadata meta = doc.getMetadata();

            Preferences prefs = getPreferences();
            boolean byOriginal = prefs.getBoolean("SaveByOriginal", true);
            File dir;
            if (byOriginal || LastSaveOptions == null) {
                dir = meta.getFile().getParentFile();
            }
            else {
                dir = LastSaveOptions.getFile().getParentFile();
            }
            options = SaveOptions.getDefaultSaveOptions();

            ImageFileExportOptions export =
                (ImageFileExportOptions) SaveOptions.getExportOptions(options);
            ImageType type = export.getImageType();

            File file = new File(dir, meta.getFile().getName());
            String name = ExportNameUtility.getBaseName(file);
            name = name + "_lzn." + type.getExtensions()[0];
            file = new File(name);
            file = ExportNameUtility.ensureNotExists(file);
View Full Code Here

Examples of com.lightcrafts.image.metadata.ImageMetadata

        File file = doc.getFile();
        if (file != null) {
            jobName = file.getName();
        }
        else {
            ImageMetadata meta = doc.getMetadata();
            jobName = meta.getFile().getName();
        }
        printer.setJobName(jobName);

        boolean doPrint = printer.printDialog();
View Full Code Here

Examples of com.lightcrafts.image.metadata.ImageMetadata

    public static void main(String[] args)
        throws BadImageFileException, IOException, UnknownImageTypeException
    {
        File file = new File(args[0]);
        ImageInfo info = ImageInfo.getInstanceFor(file);
        ImageMetadata meta = info.getMetadata();
        URL url = getDefaultDocumentUrl(meta);
        if (url != null) {
            XmlDocument doc = DocumentDatabase.getDefaultDocument(meta);
            doc.write(System.out);
        }
View Full Code Here

Examples of com.lightcrafts.image.metadata.ImageMetadata

    // the resize dimensions, which are set to the document's "natural"
    // dimensions.
    private static SaveOptions createTemplateSaveOptions(
        Document doc, ImageFileExportOptions export, boolean ignoreResize
    ) {
        ImageMetadata meta = doc.getMetadata();
        File file = meta.getFile();
        ImageType type = export.getImageType();
        String ext = type.getExtensions()[0];
        file = ExportNameUtility.setFileExtension(file, ext);
        file = ExportNameUtility.ensureNotExists(file);
        if (type == LZNImageType.INSTANCE) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.