Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you force ImageMagick to use PNG-8 alpha transparency?

When I try to run a bunch of PNG-8 images with alpha transparency through Imagemagick, it converts them to PNG-32, increasing the file size a lot.

Is it possible to force Imagemagick to keep my image type as 8-bit PNG?

like image 368
mager Avatar asked Sep 23 '09 19:09

mager


2 Answers

You can do it like this:

convert test.png PNG8:test2.png

I've had varying luck with IM and PNG8, but this is the correct way to do it.

like image 191
Matthew Talbert Avatar answered Nov 15 '22 10:11

Matthew Talbert


I seem to get the best result using the following

convert src.png -colors 256 PNG8:dest.png
like image 10
scarba05 Avatar answered Nov 15 '22 12:11

scarba05