Package com.lightcrafts.image.metadata

Examples of com.lightcrafts.image.metadata.ImageMetadata


    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


            }
            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

        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) {
                handleError(file, e);
View Full Code Here

                    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

        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) {
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

    public void readMetadata( ImageInfo imageInfo )
        throws BadImageFileException, IOException, UnknownImageTypeException
    {
        final TIFFMetadataReader reader =
            new TIFFMetadataReader( imageInfo, DNGDirectory.class );
        final ImageMetadata metadata = reader.readMetadata();
        final Document xmpDoc = getXMP( imageInfo );
        if ( xmpDoc != null ) {
            final ImageMetadata xmpMetadata =
                XMPMetadataReader.readFrom( xmpDoc );
            metadata.mergeFrom( xmpMetadata );
        }
    }
View Full Code Here

     */
    public RenderedImage getPreviewImage( ImageInfo imageInfo, int maxWidth,
                                          int maxHeight )
        throws BadImageFileException, IOException, UnknownImageTypeException
    {
        final ImageMetadata metadata = imageInfo.getMetadata();
        final ImageMetadataDirectory dir =
            metadata.getDirectoryFor( CIFFDirectory.class );
        if ( dir != null ) {
            final ImageMetaValue colorSpace = dir.getValue( CIFF_COLOR_SPACE );
            ColorSpace cs = JAIContext.sRGBColorSpace;
            if ( colorSpace != null )
                switch ( colorSpace.getIntValue() ) {
View Full Code Here

     */
    public void readMetadata( ImageInfo imageInfo )
        throws BadImageFileException, IOException
    {
        final ImageMetadataReader reader = new TIFFMetadataReader( imageInfo );
        final ImageMetadata metadata = reader.readMetadata();
        MetadataUtil.removePreviewMetadataFrom( metadata );
        MetadataUtil.removeWidthHeightFrom( metadata );
    }
View Full Code Here

            }
            File file = datum.getFile();
            String label = file.getName();
            ImageDatumType type = datum.getType();
            String tag = type.toString();
            ImageMetadata meta = datum.getMetadata(true);
            int rating = meta.getRating();
            boolean selected = selection.isSelected(datum);
            renderer.paint(g, image, label, tag, rating, rect, selected);
        }
        g.setColor(oldColor);
        g.setClip(clip);
View Full Code Here

TOP

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

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.