Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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!

share|improve this question
add comment

1 Answer

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
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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