
too much negative space
But, when I import my sprites into my Pk3 with SLADE, my large original images are positioned perfectly when I use the 'auto offset' feature. They appear exactly as I intend them to.
With that said, I would like to reduce the filesize significantly, so I have created a simple macro for a command-line image utility (ImageMagick) to trim the negative space and reduce the file size. The resulting trim of the above image looks like this:

a neat crop
Code: Select all
magick ${file.name} -fuzz 1% -trim trimmed_${file.name}
I have a large volume of sprites which are impossible to manually realign by hand. Some of my monster sprites have thousands of frames. It is my understanding that offset data is stored in the PNG somehow™. This is where my knowledge falters, I have only a very basic understanding of how data is stored in files, and don't really have a grasp on manipulating binary data. My ideal solution is one where I have to do as little work as possible. I would like to know if anyone has any experience with ImageMagick, and knows if there is a way to amend my command to simply inject offset data.
If this understanding is incorrect, is there some existing and tested solution I could implement or an alternate way to approach this?
Left - correct. Right - incorrect.


EDIT: Also, I will not be using these particular sprites in any projects, I've decided to scrap them in favor of a different design. I'll post the full set later.