commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Nesbitt <>
Subject [Sanselan] - Help Parsing EXIF Info embedded in PNG
Date Wed, 03 Mar 2010 18:38:44 GMT

I am trying to figure out how to parse EXIF info embedded in a PNG.

I have a PNG for which the Sanselan.getMetadata call returns a single entry. 
Executing getKeyword on this one entry returns "Raw profile type exif" while 
getText() returns what appears to be a string of hex numbers. I also have 
reason to believe that this metadata is stored in a zTxt block.

I have not been able to decode the text block - it doesn't seem to follow the 
EXIF standards that I have found and searching for a known hex string (in this 
case looking for the word Canon in hex) doesn't provide any matches.

So here are a few questions I hope someone can answer.
* In the case of a zTxt bloc does the getText() call return the raw compressed 
contents or are the contents decompressed. In other words do I need to 
uncompress the results of the getText() call and if so how?

* Is there a way ithat I can have Sanselan 1) parse this block and 2) output 
all EXIF fields without having to perform a find on each potential EXIF field?

If Sanselan can't do this, is there another Java library out there that can?

Thanks in advance for the help


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message