dragon66 / icafe

Java library for reading, writing, converting and manipulating images and metadata
Eclipse Public License 1.0
204 stars 58 forks source link

Investigate PNG IPTC issue #117

Closed dragon66 closed 2 months ago

dragon66 commented 2 months ago

In response to a user's request, open this ticket to investigate a special case related to IPTC embedded in PNG but not the normal way. Standard_withKeywords

dragon66 commented 2 months ago

Based on analysis of the attached image, added experimental support for PNG IPTC in zTXT extraction.

dragon66 commented 2 months ago

Figured out the structure and location for all PNG metadata types - a) XMP in one of the iTXt chunk with key: "XML:com.adobe.xmp". 2) IPTC/EXIF in one of the zTXt chunk. For IPTC, the key is "Raw profile type iptc" while for EXIF it would be "Raw profile type exif". C) EXIF can also exist as one of the chunk with type "eXIf" in parallel with all the textual chunks so does "ICC" profile metadata.

Note: the actual data which are part of the value for the above given keys are hex encoded text. The first part of the value provideds the size for the hex encoded string which follows.

ICAFE can now read all these metadata types including both flavors of the EXIF type.