Possible PNG bug IM 6.8.0.5 Q16 Mac OSX Snow Leopard

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Possible PNG bug IM 6.8.0.5 Q16 Mac OSX Snow Leopard

Post by fmw42 »

IM 6.8.0.5 Q16 Mac OSX Snow Leopard

Gradients saved as PNGs are not appearing correct and have repeated patterns. They work fine with GIF and JPG.

convert -size 300x500 gradient: tmp.png
vs
convert -size 300x500 gradient: tmp.gif
convert -size 300x500 gradient: tmp.jpg

Similarly with radial-gradient

Note this was not an issue in IM 6.8.0.4 Q16. I just tested that and it looked fine.
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Possible PNG bug IM 6.8.0.5 Q16 Mac OSX Snow Leopard

Post by glennrp »

Something went wrong withreading and writing 16-bit images. I am seeing the
bug also, with Ubuntu-12.04 and IM-6.8.0-6 beta.

Code: Select all

convert -size 300x500 gradient: -depth 8 tmp.png
works OK (except that the PNG is darker than the GIF but that's another problem).

[edit] Reverting to coders/png.c from IM-6.8.0-4 does not fix the problem.
Rebuilding IM-6.8.0-4 with coders/png.c from IM-6.8.0-5 still works properly
It seems that 16-bit samples are in a different endian storage now. I am looking with
suspicion at the changes to magick/quantum.c, magick/quantum-import.c and
magick/quantum-export.c that occurred between -4 and -5.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Possible PNG bug IM 6.8.0.5 Q16 Mac OSX Snow Leopard

Post by magick »

We can reproduce the problem and have a patch. Look for it in ImageMagick 6.8.0-6 Beta by sometime tomorrow.
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Possible PNG bug IM 6.8.0.5 Q16 Mac OSX Snow Leopard

Post by glennrp »

Fix is checked in to coders/png.c in SVN revision 10018 (IM6) and 10019 (IM7).
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Possible PNG bug IM 6.8.0.5 Q16 Mac OSX Snow Leopard

Post by fmw42 »

verified that it is fixed in IM 6.8.0.6 Q16 Mac OSX Snow Leopard
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Possible PNG bug IM 6.8.0.5 Q16 Mac OSX Snow Leopard

Post by glennrp »

A fix for the too-dark PNG image mentioned above is fixed in
SVN revision 10061, IM-6.8.0-8.
Post Reply