2

I have a special case where I'm using alpha transparency in indexed PNGs from Fireworks to keep the file size of PNG's in an iOS game down. (That is, indexed colors like an 8bit PNG but alpha transparency channel like 24bit PNG, yes it works on iOS and yields a lot smaller files at a small visual expense.) I then downscale the Retina versions using a bash script which runs the following command on each file:

convert -resize 50%

However, a file that was 664B in Retina size grows to 2KB instead of shrinking. If i resave the resampled file in Fireworks it shrinks to about 550B, so clearly ImageMagick is doing something fishy here.

So, 1, does convert even support saving with indexed transparency? Photoshop doesn't and files need to be opened with Fireworks! And if so, how do i tell it? I can't find anything about indexing in the command line options for convert.

Thanks!

1

I found that you need to specify the output format explicitly. ImageMagick will convert your PNGs to PNG32, thus increasing file size. You rather want PNG8.

convert -resize 50% input.png png8:output.png

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.