问题
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