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

喜夏-厌秋 提交于 2019-12-18 15:03:25

问题


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?


回答1:


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.




回答2:


I seem to get the best result using the following

convert src.png -colors 256 PNG8:dest.png


来源:https://stackoverflow.com/questions/1468221/can-you-force-imagemagick-to-use-png-8-alpha-transparency

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!