Crash when quantizing certain images

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
Reinderien
Posts: 3
Joined: 2011-11-20T14:44:32-07:00
Authentication code: 8675308

Crash when quantizing certain images

Post by Reinderien »

When dithering certain images, convert.exe crashes. I have tried this with both the 32-bit and 64-bit Windows binaries, version 6.7.3.

Download the 2560x1440 version of http://interfacelift.com/wallpaper/deta ... unset.html . Then run:
convert -colors 10 2124_tuscansunsetmondaymay25th2009_2560x1440.jpg out.png

It seems to be consistent per-image - I have many other backgrounds of that size that all crash the program.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Crash when quantizing certain images

Post by fmw42 »

try reading the image before setting the colors.

The following works just fine for me on IM 6.7.3.7 Q16 Mac OSX Tiger:

convert 02124_tuscansunsetmondaymay25th2009_2560x1440.jpg -colors 10 PNG8:02124_tuscansunsetmondaymay25th2009_2560x1440.png
Last edited by fmw42 on 2011-11-20T15:29:12-07:00, edited 1 time in total.
Reinderien
Posts: 3
Joined: 2011-11-20T14:44:32-07:00
Authentication code: 8675308

Re: Crash when quantizing certain images

Post by Reinderien »

That actually worked. However, I would still consider this a bug...
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Crash when quantizing certain images

Post by fmw42 »

No it is not. You are using IM 5 syntax on IM 6. See http://www.imagemagick.org/Usage/basics/#cmdline
Reinderien
Posts: 3
Joined: 2011-11-20T14:44:32-07:00
Authentication code: 8675308

Re: Crash when quantizing certain images

Post by Reinderien »

That's fair enough, but one would think that if it's a syntax problem, the parser would know so and fail gracefully instead of randomly crashing on some input images and not others.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Crash when quantizing certain images

Post by fmw42 »

IM is somewhat conducive to backward compatibility. So your ability to have it work is feasible as far as I know. I don't fully understand how much is backward compatible. So I would say that it is puzzling that it fails on certain images if it works on others. But perhaps it has to do with your specific image or size of the image.
Post Reply