Package com.lightcrafts.image

Examples of com.lightcrafts.image.ImageInfo


    private void updateImage(TreePath path) {
        try {
            FileNode node = (FileNode) path.getLastPathComponent();
            File file = node.getFile();
            ImageInfo info = ImageInfo.getInstanceFor(file);
            ImageMetadata meta = info.getMetadata();
            if (meta != null) {
                if (thumb != null) {
                    remove(thumb);
                }
                thumb = new ThumbnailComponent(info);
View Full Code Here


                xmlDoc = new XmlDocument(in);
            }
            catch (IOException e) {
                // Maybe it's an image:
                try {
                    ImageInfo info = ImageInfo.getInstanceFor(file);
                    ImageMetadata meta = info.getMetadata();
                    new Document(meta, null);
                }
                catch (BadImageFileException f) {
                    System.err.println(e.getMessage());
                }
View Full Code Here

                printCameraMake(files[n]);
            }
        }
        if (file.isFile()) {
            try {
                ImageInfo info = ImageInfo.getInstanceFor(file);
                ImageType type = info.getImageType();
                if (type instanceof RawImageType) {
                    ImageMetadata meta = info.getMetadata();
                    String make = meta.getCameraMake(true);
                    System.out.println(file.getName() + ": |" + make + "|");
                }
            }
            catch (BadImageFileException e) {
View Full Code Here

                if (xmlDoc != null) {
                    doc = new Document(xmlDoc);
                }
                else {
                    // Maybe it's an image:
                    ImageInfo info = ImageInfo.getInstanceFor(file);
                    ImageMetadata meta = info.getMetadata();
                    doc = new Document(meta);
                }
            }
            catch (BadImageFileException e) {
                fail("Invalid image file", e);
View Full Code Here

        TreePath path = event.getPath();
        getViewport().removeAll();
        if (path != null) {
            FileNode node = (FileNode) path.getLastPathComponent();
            File file = node.getFile();
            ImageInfo info = ImageInfo.getInstanceFor(file);
            ImageMetadata meta = null;
            Exception error = null;
            try {
                meta = info.getMetadata();
            }
            catch (Exception e) {
                error = e;
            }
            if (meta != null) {
View Full Code Here

    private void updateImage(TreePath path) {
        try {
            FileNode node = (FileNode) path.getLastPathComponent();
            File file = node.getFile();
            ImageInfo info = ImageInfo.getInstanceFor(file);
            ImageMetadata meta = info.getMetadata();
            if (meta != null) {
                if (preview != null) {
                    remove(preview);
                }
                preview = new PreviewComponent(info);
View Full Code Here

        if ( imageFile.exists() && imageFile.canRead() ) {
            ICC_Profile profile = null;
            RenderedImage ri = null;

            try {
                ImageInfo imageInfo = ImageInfo.getInstanceFor( imageFile );
                ri = imageInfo.getImage( null );
            }
            catch ( Exception e ) {
                e.printStackTrace();
                System.exit( -1 );
            }
View Full Code Here

        removeValue( CORE_ORIGINAL_IMAGE_HEIGHT );
        removeValue( CORE_ORIGINAL_IMAGE_WIDTH );
        try {
            final File origImageFile = imageInfo.getOriginalFile();
            if ( origImageFile != null ) {
                final ImageInfo origInfo =
                    ImageInfo.getInstanceFor( origImageFile );
                final ImageMetadata origMetadata = origInfo.getMetadata();
                putValue(
                    CORE_ORIGINAL_IMAGE_HEIGHT,
                    new UnsignedShortMetaValue( origMetadata.getImageHeight() )
                );
                putValue(
View Full Code Here

    }

    private static File getXmpFile(File file)
        throws IOException, BadImageFileException, UnknownImageTypeException
    {
        ImageInfo info = ImageInfo.getInstanceFor(file);
        String name = info.getXMPFilename();
        return new File(name);
    }
View Full Code Here

            return;
        }
        if ( file.isHidden() || !file.isFile() )
            return;

        final ImageInfo imageInfo = ImageInfo.getInstanceFor( file );
        try {
            imageInfo.getImageType();
            m_suite.addTest( new ReadMetadataTestCase( imageInfo ) );
        }
        catch ( UnknownImageTypeException e ) {
            // ignore
        }
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.