You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sanselan-dev@incubator.apache.org by Pa...@emc.com on 2009/02/06 15:55:21 UTC

EXIF metadata from Tiff Format

Hi,

 

I am new to Sanselan.. I would like to extract EXIF metadata from Tiff
image... When using Sanselan, I have noticed some of the properties like
Make, Model etc are missing. Is there any way to extract ALL metadata
information from TIFF image.. Its extracting all the info nicely from
JPEG format. 

This is what I used

        IImageMetadata metadata = null;

        Try

        {

            metadata = Sanselan.getMetadata(file);

        } catch ( ImageReadException e) {

            e.printStackTrace();

        } catch ( IOException e) {

            e.printStackTrace();

        }

        if( metadata instanceof TiffImageMetadata)

        {

            TiffImageMetadata tiggMetadata = (TiffImageMetadata)
metadata;

 

             ArrayList items = tiggMetadata.getItems();

            for (int i = 0; i < items.size(); i++) {

                Object item = items.get(i);

                System.out.println("    " + "item: " +

                    item);

            }

            System.out.println(tiggMetadata.toString());

        }

Any help would be greatly appreciated..

Thanks

Sheeba Padmanabhan 

 


Re: EXIF metadata from Tiff Format

Posted by Craig L Russell <Cr...@Sun.COM>.
Hi Sheeba Padmanabhan,

Thanks for your interest in Sanselan.

I'd like to encourage you to take a look at the code and see if you  
can find the problem and propose a patch.

We're interested in contributions from the community to help make  
Sanselan a better tool and to make the community stronger.

Regards,

Craig

On Feb 6, 2009, at 7:55 AM, Padmanabhan_Sheeba@emc.com wrote:

> Hi,
>
>
>
> I am new to Sanselan.. I would like to extract EXIF metadata from Tiff
> image... When using Sanselan, I have noticed some of the properties  
> like
> Make, Model etc are missing. Is there any way to extract ALL metadata
> information from TIFF image.. Its extracting all the info nicely from
> JPEG format.
>
> This is what I used
>
>        IImageMetadata metadata = null;
>
>        Try
>
>        {
>
>            metadata = Sanselan.getMetadata(file);
>
>        } catch ( ImageReadException e) {
>
>            e.printStackTrace();
>
>        } catch ( IOException e) {
>
>            e.printStackTrace();
>
>        }
>
>        if( metadata instanceof TiffImageMetadata)
>
>        {
>
>            TiffImageMetadata tiggMetadata = (TiffImageMetadata)
> metadata;
>
>
>
>             ArrayList items = tiggMetadata.getItems();
>
>            for (int i = 0; i < items.size(); i++) {
>
>                Object item = items.get(i);
>
>                System.out.println("    " + "item: " +
>
>                    item);
>
>            }
>
>            System.out.println(tiggMetadata.toString());
>
>        }
>
> Any help would be greatly appreciated..
>
> Thanks
>
> Sheeba Padmanabhan
>
>
>

Craig L Russell
Architect, Sun Java Enterprise System http://db.apache.org/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!