Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-TagsFromFile -Description inserts zTXt data after IDAT #23

Closed
Gamer025 opened this issue Aug 16, 2019 · 4 comments
Closed

-TagsFromFile -Description inserts zTXt data after IDAT #23

Gamer025 opened this issue Aug 16, 2019 · 4 comments

Comments

@Gamer025
Copy link

Im currently trying to automate the process of copying a zTXt chunk from one file to another file.
For this im using the command:

exiftool.exe -z -TagsFromFile D:\path\to\file\areas.dmi -Description D:\path\to\file\areas.dmi.new

This results in the zTXt being copied to the new file but after the IDAT chunks.

.dmi is format used by a old game engine called Byond but its literally just a png file with zTXt Keyword "Description" being used to associate the image data with sprites in game.
However if the zTXt chunk comes after the IDAT chunks the game engine fails to read the file.

Original file seen by the programm TweakPNG:
image
My modified file to which I want to add the zTXt tag after using the mentioned command:
image
The sRGB, gAMA etc. comes from me and I want the zTXt chunk somewhere between IHDR and IDAT

I read that in earlier version you had to use PNGEarlyXMP for exiftool to write the data before IDAT but apparently in newer versions this should happen automatically.

Im using exiftools version 11.62.

@boardhead
Copy link
Contributor

boardhead commented Aug 16, 2019

The PNGEarlyXMP applied only to XMP. The current version always writes XMP before IDAT. Other zTXt chunks are written after IDAT. It looks like I maybe need to extend this to zTXt (and other text chunks). I'll look into this.

@boardhead
Copy link
Contributor

ExifTool 11.63 (just released) writes all text chunks before IDAT.

@Gamer025
Copy link
Author

I just tested the new version and now it works just like it need.
Thank you very much for your very fast response and the fast patch.

@boardhead
Copy link
Contributor

Great, thanks for the feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants