I'm trying to finish a set of tools to automate ripping models (http://forum.zdoom.org/viewtopic.php?f=3&t=28313) but have run into an issue concerning batch trimming of PNG files. Essentially my problem is that I cannot use a command line image editor (currently using http://www.imagemagick.org/script/index.php) to trim transparent pixels without losing the grAb chunk. I'm somewhat lost in this area so any help would be appreciated. From the looks of the wiki, the very format of the grAb chunk should tell the tool to keep it, right? Then why does it keep getting lost?
This is the command I am entering; it successfully trims the image but loses the grAb chunk. I know the grAb chunk determines an offset from the top left of the image and even if it was kept it would be wrong after a trim but, after I get over this obstacle, I'm hoping to be able to modify the grAb chunk to adjust for the trimmed space.
Code: Select all
Mogrify -trim *.png
Edit: 'GrAb' changed to 'grAb'
Edit2: I've also posed this problem on the imagemagick forums: http://forum.zdoom.org/viewtopic.php?f= ... 43#p544643