Hello,
I am trying to write a title into a PNG file using the exiftool. That works well but it will end up in both PNG tEXt and PNG iTXt.
The Problem now is that if I try to modify the title with a different tool (iTag) this tool modifies only the PNG iTXt. When I now try to read the title using the exiftool again it will return only the unmodified title from PNG tEXt.
There are some ways around this problem but I did not manage to achieve one of them:
1) Writing only to PNG iTXt
2) Removing only PNG tEXt
3) Reading only PNG iTXt and ignoring PNG tEXt
I tried already passing -charset UTF8 but with no success so far. Also accessing the group or tags directly did not work for me. Maybe I do not have the correct names for the group or tag?
I always end up with the following (only the relevant parts extracted with -v option):
Writing the title to the PNG with exiftool:
PNG iTXt (1652 bytes):
+ [XMP directory, 1630 bytes]
| XMPToolkit = Image::ExifTool 10.63
| Title = FirstTitle
...
PNG tEXt (16 bytes):
| Title = FirstTitle
PNG IEND (end of image)
And after changing it with iTag:
PNG iTXt (1652 bytes):
+ [XMP directory, 1630 bytes]
| XMPToolkit = XMP Core 4.4.0
| Title = ChangedTitle
...
PNG tEXt (16 bytes):
| Title = FirstTitle
PNG IEND (end of image)
Does anyone know how I can achive one of my three ways around this problem using exiftool or even has a better way to do it?
Any help is highly appreciated.
Andy
Hi Andy,
Quote from: dev.WsC on October 16, 2017, 09:17:47 AM
I now try to read the title using the exiftool again it will return only the unmodified title from PNG tEXt.
ExifTool will show both. Add the
-a option to see duplicate tags, and
-G to see where they are stored.
From your verbose output, I see that the iTXt you are talking about is in fact XMP, accessed via XMP:Title. The other one is PNG:Title.
It looks like iTag writes only XMP, not PNG tags. To do this with ExifTool, write XMP:Title, not just "Title".
- Phil
Hi Phil,
thanks a lot for answering this so fast.
That helped a lot.
With you your answer I can work around iTag in more than one way :-)
I chose to only write the XMP:Title in the first place and also to only read the XMP:Title after iTag changed it. I also was able to remove only the PNG:Title and keep the XMP:Title from the files already tagged and changed.
Thank you so much!
- Andy