graphicsmagick is doubling the size of “some” PNG files

不问归期 提交于 2019-12-24 07:05:19

问题


Using GraphicsMagick to read in a PNG file and write it out under a different name is causing the file size to increase by more than double. This only happens to some PNG files and I can't figure out what is causing it.

Example problem PNG: http://www.google.co.in/logos/2011/verne-hp-3.png

I have tried everything from disabling the opacity channel to using different compression types to changing the interlacing type but nothing is helping me understand what is causing this problem.

If anyone has any suggestions on what might be causing this, your help would be very welcome.

Thank you.


回答1:


The file is an indexed-color PNG with alpha stored in a tRNS chunk. When I rewrite this file to disk GM uses RGBA PNG, which causes the image size to increase.



来源:https://stackoverflow.com/questions/4962020/graphicsmagick-is-doubling-the-size-of-some-png-files

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