Package com.lightcrafts.image

Examples of com.lightcrafts.image.ImageInfo


        XmlDocument doc = new XmlDocument(
            new FileInputStream(
                "/Users/anton/test/1/test.lzn"
            )
        );
        ImageInfo info = ImageInfo.getInstanceFor(
            new File("/Users/anton/test/1/test.crw")
        );
        ImageMetadata meta = info.getMetadata();

        SaveTemplateDialog dialog = new SaveTemplateDialog();
        dialog.showDialog(meta, doc, null, null);

        System.out.println("name=" + dialog.getNameText());
View Full Code Here


        repaint();
    }

    void setFile(File file) {
        if (file != null) {
            ImageInfo info = ImageInfo.getInstanceFor(file);
            try {
                image = info.getImage(null);
                image = systemColorSpaceImage(image);
            }
            catch (Throwable t) {
                // BadImageFileException
                // ColorProfileException
View Full Code Here

    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

        try {
            File file = meta.getFile();
            DocumentReader.Interpretation interp = DocumentReader.read(file);
            if ((interp != null) && (interp.imageFile != null)) {
                file = interp.imageFile;
                ImageInfo info = ImageInfo.getInstanceFor(file);
                meta = info.getMetadata();
                return meta;
            }
        }
        catch (Throwable e) {
            // can't find LZN data, so return null
View Full Code Here

    private static void colorProfileFrom(
        ImageMetadata meta, ImageFileExportOptions options
    ) {
        if (! (meta.getImageType() instanceof RawImageType)) {
            try {
                ImageInfo info = ImageInfo.getInstanceFor(meta.getFile());
                ICC_Profile profile = info.getImageType().getICCProfile(info);
                String profileName = ColorProfileInfo.getNameOf(profile);
                options.colorProfile.setValue(profileName);
            }
            catch (Throwable t) {
                //   BadImageFileException
View Full Code Here

    // Used in the save logic, and also by the SaveMenuItem to decide whether
    // to update its text.
    public static boolean shouldSaveDirectly(Document doc) {
        final OtherApplication app = (OtherApplication) doc.getSource();
        if (app != null) {
            final ImageInfo info = getImageInfo(doc);
            return app.shouldSaveDirectly(info);
        }
        return false;
    }
View Full Code Here

        return false;
    }

    static SaveOptions createExportOptions(Document doc) {
        final OtherApplication app = (OtherApplication) doc.getSource();
        final ImageInfo info = getImageInfo(doc);
        final Engine engine = doc.getEngine();
        final Dimension size = engine.getNaturalSize();
        try {
            final ImageExportOptions export =
                app.createExportOptions(info, size);
View Full Code Here

    // successful, remembers the selection in preferences, and updates the
    // frame title.
    public void selectionChanged(ImageBrowserEvent event) {
        File file = event.getFile();
        if (file != null) {
            ImageInfo imageInfo = ImageInfo.getInstanceFor(file);
            info.setImage(imageInfo);
            BrowserSelectionMemory.setRememberedFile(file);
        }
        else {
            info.setImage(null);
View Full Code Here

    LznPreviewProvider(ComboFrame frame) {
        this.frame = frame;
    }

    public RenderedImage getPreviewImage(File file, int size) {
        ImageInfo info = ImageInfo.getInstanceFor(file);
        try {
            if (info.getImageType() != LZNImageType.INSTANCE) {
                return null;
            }
            Document doc = Application.createDocumentHeadless(file);
            Engine engine = doc.getEngine();
            Dimension dim = new Dimension(size, size);
View Full Code Here

        System.setProperty( "apple.laf.useScreenMenuBar", "true" );
        System.setProperty( "swing.aatext", "true" );

        UIManager.setLookAndFeel(Platform.getPlatform().getLookAndFeel());
        File file = new File(args[0]);
        ImageInfo info = ImageInfo.getInstanceFor(file);
        MetadataScroll scroll = new MetadataScroll(info);

        scroll.getViewport().setBackground(LightZoneSkin.Colors.ToolPanesBackground);

        JFrame frame = new JFrame("MetadataScroll Test");
View Full Code Here

TOP

Related Classes of com.lightcrafts.image.ImageInfo

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.