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.

Can anybody recommend a good method of bulk converting a large amount of PNG-24 files to PNG-8 with as little loss of quality as possible and maintaining transparency?

I've tried ImageMagick but the resulting images weren't quite as crisp quality as I'd like. Using Paint.NET I was able to achieve far better results, but I can't bulk process with this tool as far as I know.

The settings I used with ImageMagick in case there's better options to use: convert file.png -depth 4 file-output.png

I've also been playing with OptiPNG, but I haven't discovered a was of making sure the output images are PNG-8.

share|improve this question

3 Answers 3

GIMP does good job optimizing reduced palettes. It has --batch mode and can be scripted. Also has multiple bindings, so you can write for example GIMP script in Python.

share|improve this answer
    
Thanks vartec - while I was researching how to script GIMP I came across this cool tool as it was mentioned as a plug-in for GIMP (but runs stand-alone) - RIOT –  Gavin Feb 17 '11 at 20:48
up vote 1 down vote accepted

I came across this great tool in my search - RIOT - Radical Image Optimization Tool

Does everything I require and lets you see side-by-side comparison of before and after sample image before you do the batch process.

share|improve this answer

pngquant is exactly the tool for this. It generates palettes better than ImageMagick.

pngquant --quality=0-90 *.png

This will convert all png files in current directory, and automatically choose number of colors to achieve quality similar to 90%-quality JPEG.

(if it doesn't accept the --quality switch it means you have terribly outdated low-quality version and you should upgrade).

share|improve this answer
1  
Add --force --ext .png to overwrite the original files. –  redburn Aug 20 '13 at 11:31

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.