convert an 8bit PNG result in a corrupted image
Swiss army knife of image processing
Brought to you by:
bfriesen
I use GM 1.3.18 (on Linux and Windows), and when I try to convert 8 bits PNG (simple convert or resize) to "optimized" PNG I got a corrupted PNG (stretched with vertical lines).
For example, I try to convert the "rechpdv2.png" image to an optimized png with the following command line :
gm convert -type Optimize rechpdv2.png out1318.png
The resulting image (out1318.png) is completly scrambled. See attachments for details.
If I removre "-type optimize", the resulting image is OK.
Identifying the original image give :
gm convert -type Optimize rechpdv2.png out1318.png
rechpdv2.png PNG 468x438+0+0 DirectClass 8-bit 21.0K 0.000u 0:01
add out1318.png, corrupted resulting image
Last edit: Jemore 2013-11-13
I am able to reproduce this here. The original PNG has an enabled opacity channel for which all pixels are completely opaque. This command produces good output:
gm convert rechpdv2.png +matte -type Optimize out1318.png
Hopefully Glenn will be able to help with fixing this.
I disabled "-type Optimize" some years ago in ImageMagick because the feature was unreliable, and was wasted effort anyhow in the usual case where users would run a real optimizer such as pngcrush or optipng on the result.
Fixed in Mercurial by changeset 14017:6b12be39a3cf and fix will appear in the 1.3.20 release.