Menu

#252 convert an 8bit PNG result in a corrupted image

v1.0_(example)
closed-fixed
None
5
2014-07-25
2013-11-13
Jemore
No

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

1 Attachments

Discussion

  • Jemore

    Jemore - 2013-11-13

    add out1318.png, corrupted resulting image

     

    Last edit: Jemore 2013-11-13
  • Bob Friesenhahn

    Bob Friesenhahn - 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.

     
  • Glenn Randers-Pehrson

    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.

     
  • Bob Friesenhahn

    Bob Friesenhahn - 2014-01-05
    • status: open --> closed-fixed
    • assigned_to: Bob Friesenhahn
     
  • Bob Friesenhahn

    Bob Friesenhahn - 2014-01-05

    Fixed in Mercurial by changeset 14017:6b12be39a3cf and fix will appear in the 1.3.20 release.

     

Log in to post a comment.

MongoDB Logo MongoDB