Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > EXIF tag handling in Java

Reply
Thread Tools

EXIF tag handling in Java

 
 
Martin Gregorie
Guest
Posts: n/a
 
      03-24-2012
Can anybody recommend a good EXIF tag handling Java package?

I need to use it for reading and writing 'Comment' tags in at least JPG
files, and preferably for more image types than just JPG. I found out, by
experimenting with exiftool, that both PNG and GIF files also support the
'Comment' tag.

I have found a couple of packages (Thang To's javaexif and Thomas Lane's
Mediautil package), both dating from 2006 or so and both largely
uncommented, which doesn't make them exactly easy to use.


--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
 
Reply With Quote
 
 
 
 
Marty Blake
Guest
Posts: n/a
 
      03-25-2012
On 24/03/2012 5:37 PM, Martin Gregorie wrote:
> Can anybody recommend a good EXIF tag handling Java package?


Install Java ImageIO and the TIFF plugin for ImageIO and you can get at
(and modify) JPEG EXIF tags using ImageIO. I'm not sure about other
formats (except TIFF should work).

 
Reply With Quote
 
 
 
 
Martin Gregorie
Guest
Posts: n/a
 
      03-25-2012
On Sat, 24 Mar 2012 23:13:46 -0400, Marty Blake wrote:

> On 24/03/2012 5:37 PM, Martin Gregorie wrote:
>> Can anybody recommend a good EXIF tag handling Java package?

>
> Install Java ImageIO and the TIFF plugin for ImageIO and you can get at
> (and modify) JPEG EXIF tags using ImageIO. I'm not sure about other
> formats (except TIFF should work).
>

Thanks for that. It looks like all this is in the javax.imageio.*
packages.

I've had a look at the docs for these packages, including the plugins,
and frankly I'm baffled and/or confused. There are packages that define
the tags but nothing that I can find that can, for instance, read or
write tags from something like a BufferedImage. Is there a tutorial or
other how-to that covers classes that provide accesss to EXIF tags?


--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
 
Reply With Quote
 
Jeff Higgins
Guest
Posts: n/a
 
      03-25-2012
On 03/25/2012 09:09 AM, Martin Gregorie wrote:
> On Sat, 24 Mar 2012 23:13:46 -0400, Marty Blake wrote:
>
>> On 24/03/2012 5:37 PM, Martin Gregorie wrote:
>>> Can anybody recommend a good EXIF tag handling Java package?

>>
>> Install Java ImageIO and the TIFF plugin for ImageIO and you can get at
>> (and modify) JPEG EXIF tags using ImageIO. I'm not sure about other
>> formats (except TIFF should work).
>>

> Thanks for that. It looks like all this is in the javax.imageio.*
> packages.
>
> I've had a look at the docs for these packages, including the plugins,
> and frankly I'm baffled and/or confused. There are packages that define
> the tags but nothing that I can find that can, for instance, read or
> write tags from something like a BufferedImage. Is there a tutorial or
> other how-to that covers classes that provide accesss to EXIF tags?
>
>

This may help. May not too. Pretty old.
<http://www.barregren.se/blog/how-read-exif-and-iptc-java-image-i-o-api>
A possible bug.
<http://george.i.ph/blogs/george/2007/09/06/read-and-write-jpeg-exif-using-the-javaximageiometadata-package/>
Links to the "standard" and "native" metadata formats.
<http://docs.oracle.com/javase/7/docs/api/javax/imageio/metadata/package-summary.html>
The parser library referenced in the first link above.
<http://code.google.com/p/metadata-extractor/>


 
Reply With Quote
 
Jeff Higgins
Guest
Posts: n/a
 
      03-25-2012
On 03/25/2012 11:42 AM, Jeff Higgins wrote:
> On 03/25/2012 09:09 AM, Martin Gregorie wrote:
>> On Sat, 24 Mar 2012 23:13:46 -0400, Marty Blake wrote:
>>
>>> On 24/03/2012 5:37 PM, Martin Gregorie wrote:
>>>> Can anybody recommend a good EXIF tag handling Java package?
>>>
>>> Install Java ImageIO and the TIFF plugin for ImageIO and you can get at
>>> (and modify) JPEG EXIF tags using ImageIO. I'm not sure about other
>>> formats (except TIFF should work).
>>>

>> Thanks for that. It looks like all this is in the javax.imageio.*
>> packages.
>>
>> I've had a look at the docs for these packages, including the plugins,
>> and frankly I'm baffled and/or confused. There are packages that define
>> the tags but nothing that I can find that can, for instance, read or
>> write tags from something like a BufferedImage. Is there a tutorial or
>> other how-to that covers classes that provide accesss to EXIF tags?
>>
>>

> This may help. May not too. Pretty old.
> <http://www.barregren.se/blog/how-read-exif-and-iptc-java-image-i-o-api>


Link to source broken, found a copyhere:
<http://files.codes-sources.com/fichi...gesNumeriques+[javaFR]\src\com\picturegrid\imageio\metadata\ImageIOMetad ataDemo.java>

> A possible bug.
> <http://george.i.ph/blogs/george/2007/09/06/read-and-write-jpeg-exif-using-the-javaximageiometadata-package/>
>
> Links to the "standard" and "native" metadata formats.
> <http://docs.oracle.com/javase/7/docs/api/javax/imageio/metadata/package-summary.html>
>
> The parser library referenced in the first link above.
> <http://code.google.com/p/metadata-extractor/>
>
>


 
Reply With Quote
 
Martin Gregorie
Guest
Posts: n/a
 
      03-25-2012
On Sun, 25 Mar 2012 11:42:30 -0400, Jeff Higgins wrote:

> On 03/25/2012 09:09 AM, Martin Gregorie wrote:
>> On Sat, 24 Mar 2012 23:13:46 -0400, Marty Blake wrote:
>>
>>> On 24/03/2012 5:37 PM, Martin Gregorie wrote:
>>>> Can anybody recommend a good EXIF tag handling Java package?
>>>
>>> Install Java ImageIO and the TIFF plugin for ImageIO and you can get
>>> at (and modify) JPEG EXIF tags using ImageIO. I'm not sure about other
>>> formats (except TIFF should work).
>>>

>> Thanks for that. It looks like all this is in the javax.imageio.*
>> packages.
>>
>> I've had a look at the docs for these packages, including the plugins,
>> and frankly I'm baffled and/or confused. There are packages that define
>> the tags but nothing that I can find that can, for instance, read or
>> write tags from something like a BufferedImage. Is there a tutorial or
>> other how-to that covers classes that provide accesss to EXIF tags?
>>
>>

> This may help. May not too. Pretty old.
> <http://www.barregren.se/blog/how-read-exif-and-iptc-java-image-i-o-api>
> A possible bug.
> <http://george.i.ph/blogs/george/2007...ite-jpeg-exif-

using-the-javaximageiometadata-package/>
> Links to the "standard" and "native" metadata formats.
> <http://docs.oracle.com/javase/7/docs...geio/metadata/

package-summary.html>
> The parser library referenced in the first link above.
> <http://code.google.com/p/metadata-extractor/>


Thanks for those links. That Google parser is read-only, but its
documentation looks useful.

Just now I thought to look at Apache Commons and found the Sanselan
package, which does a similar job to the javax.imagio.* stuff but as a
free-standing package and, unlike them, it includes EXIF read/write
abilities.

Its interesting that all this stuff is about the same age: Java 1.4 or 5
and none of it seems to have been updated since. Maybe, since nothing has
changed in the JPEG/TIFF worlds since then it hasn't needed any updates,
though as its all decidedly light on documentation, some changes there
would be nice for those of us who don't understand the structure of image
files: another common thread in all these packages is that the authors
all appear to assume that everybody is an expert on image files and their
contents.


--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
 
Reply With Quote
 
Jeff Higgins
Guest
Posts: n/a
 
      03-25-2012
On 03/25/2012 12:46 PM, Martin Gregorie wrote:
>
> Just now I thought to look at Apache Commons and found the Sanselan
> package, which does a similar job to the javax.imagio.* stuff but as a
> free-standing package and, unlike them, it includes EXIF read/write
> abilities.
>

Great! Thanks for the tip.
 
Reply With Quote
 
Martin Gregorie
Guest
Posts: n/a
 
      03-25-2012
On Sun, 25 Mar 2012 12:22:23 -0400, Jeff Higgins wrote:

> On 03/25/2012 11:42 AM, Jeff Higgins wrote:
>> On 03/25/2012 09:09 AM, Martin Gregorie wrote:
>>> On Sat, 24 Mar 2012 23:13:46 -0400, Marty Blake wrote:
>>>
>>>> On 24/03/2012 5:37 PM, Martin Gregorie wrote:
>>>>> Can anybody recommend a good EXIF tag handling Java package?
>>>>
>>>> Install Java ImageIO and the TIFF plugin for ImageIO and you can get
>>>> at (and modify) JPEG EXIF tags using ImageIO. I'm not sure about
>>>> other formats (except TIFF should work).
>>>>
>>> Thanks for that. It looks like all this is in the javax.imageio.*
>>> packages.
>>>
>>> I've had a look at the docs for these packages, including the plugins,
>>> and frankly I'm baffled and/or confused. There are packages that
>>> define the tags but nothing that I can find that can, for instance,
>>> read or write tags from something like a BufferedImage. Is there a
>>> tutorial or other how-to that covers classes that provide accesss to
>>> EXIF tags?
>>>
>>>

>> This may help. May not too. Pretty old.
>> <http://www.barregren.se/blog/how-rea...ava-image-i-o-

api>
>
> Link to source broken, found a copyhere:
> <http://files.codes-sources.com/fichier_fullscreen.aspx?

id=35614&f=GestionDimagesNumeriques+[javaFR]\src\com\picturegrid\imageio
\metadata\ImageIOMetadataDemo.java>
>
>> A possible bug.
>> <http://george.i.ph/blogs/george/2007...ite-jpeg-exif-

using-the-javaximageiometadata-package/>
>>
>> Links to the "standard" and "native" metadata formats.
>> <http://docs.oracle.com/javase/7/docs...geio/metadata/

package-summary.html>
>>
>> The parser library referenced in the first link above.
>> <http://code.google.com/p/metadata-extractor/>
>>
>>


Thanks for the URL correction.


--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
 
Reply With Quote
 
Martin Gregorie
Guest
Posts: n/a
 
      03-25-2012
On Sun, 25 Mar 2012 12:59:09 -0400, Jeff Higgins wrote:

> On 03/25/2012 12:46 PM, Martin Gregorie wrote:
>>
>> Just now I thought to look at Apache Commons and found the Sanselan
>> package, which does a similar job to the javax.imagio.* stuff but as a
>> free-standing package and, unlike them, it includes EXIF read/write
>> abilities.
>>

> Great! Thanks for the tip.


I meant to add the obligatory question: has anybody used Sanselan?
http://commons.apache.org/sanselan/

If so, I'd appreciate hearing about that.


--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
 
Reply With Quote
 
Knute Johnson
Guest
Posts: n/a
 
      03-25-2012
On 3/24/2012 2:37 PM, Martin Gregorie wrote:
> Can anybody recommend a good EXIF tag handling Java package?
>
> I need to use it for reading and writing 'Comment' tags in at least JPG
> files, and preferably for more image types than just JPG. I found out, by
> experimenting with exiftool, that both PNG and GIF files also support the
> 'Comment' tag.
>
> I have found a couple of packages (Thang To's javaexif and Thomas Lane's
> Mediautil package), both dating from 2006 or so and both largely
> uncommented, which doesn't make them exactly easy to use.
>
>


Martin:

There used to be a big JAI/ImageIO users list that I belonged to several
years ago. I don't know if JAI is still relevant but I would think that
would be a good place to look for EXIF info.

I found this website: http://java.net/projects/jai-imageio/.

Hope that helps.

--

Knute Johnson
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Orientation EXIF tag value Jerry West Digital Photography 3 02-16-2006 02:51 PM
how do u invoke Tag b's Tag Handler from within Tag a's tag Handler? shruds Java 1 01-27-2006 03:00 AM
Q: Nikon 8800 EXIF orientation tag ? Iain Lea Digital Photography 1 06-08-2005 07:08 PM
Add EXIF Tag to JPEG BluDog Digital Photography 6 06-18-2004 09:26 AM
Add EXIF Tag to JPEG BluDog Digital Photography 8 06-15-2004 02:30 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57