Updating iTxt XMP data chunk

Started by bobo, September 22, 2020, 01:22:25 AM

Previous topic - Next topic

bobo

Hello,

I'm trying to see if I can update the comment and date created portions in a PNG iTxt chunk. Please see extracted portion below:

PNG iTXt (495 bytes):
  + [XMP directory, 473 bytes]
  | XMPToolkit = XMP Core 5.4.0
  | UserComment = Screenshot
  | DateCreated = 2020-09-21T21:32:01

Questions:
1 - it seems like iTXt chunks are writable looking at the documentation http://web.mit.edu/jhawk/mnt/cgs/Image-ExifTool-6.99/html/TagNames/PNG.html#TextualData - but I'm struggling to find out how I can get ExifTool to update the chunk with XMP tags since the format is not listed.
2 - I would also like to know if I can inject the iTxt XMP tags above into PNG files which do not have embedded already.

Thanks,

- Borna

StarGeek

You're overthinking it.  Just set the XMP tags and exiftool will take care of the details.  An example using the data in your listing

exiftool -XMPToolkit="XMP Core 5.4.0" -XMP:UserComment=Screenshot -XMP:DateCreated=2020-09-21T21:32:01 FILE.PNG
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

bobo

ahh crap! I thought that the PNG chunks were data blobs that needed special handling like the ICC headers.

Thanks it is working.

- Borna