1

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 Answer 1

2

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.

2
  • Have you managed to find a solution? If yes, could you help me out with this: stackoverflow.com/questions/5818603/…?
    – Alix Axel
    Apr 28, 2011 at 15:13
  • The downside to using OptiPNG is it is quite slow but try it out to see if its ok for your use case because it is an excellent tool.
    – toc777
    Apr 29, 2011 at 10:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.