fails on monochrome XPM image: not enough pixel data

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
Hubbitus
Posts: 66
Joined: 2010-05-04T10:50:21-07:00
Authentication code: 8675308
Location: Russia, Saint-Petersburg

fails on monochrome XPM image: not enough pixel data

Post by Hubbitus »

Please look at one of our user report: https://bugzilla.redhat.com/show_bug.cgi?id=1217178
There also reproduce image attached.
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: fails on monochrome XPM image: not enough pixel data

Post by glennrp »

Verified that IM-6.9.2-5 exhibits the bug. Adding one more line to the file, making it 36 rows but not changing the "35" in the header, makes a file that is then readable by IM, so there seems to be an off-by-one error in IM's xpm reader. But even though it's readable, it has the wrong color (medium gray instead of ivory).

As far as I can tell, the problem is with the use of " " as a palette index. The first line of pixels gets consumed when the decoder interprets it as a palette entry. I'm no sure whether that is a bug in IM or in the image file itself.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: fails on monochrome XPM image: not enough pixel data

Post by dlemstra »

It is an IM bug and we just pushed a patch for this to our GIT repository. This will be fixed in ImageMagick 6.9.2-6 Beta, available by sometime tomorrow.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Hubbitus
Posts: 66
Joined: 2010-05-04T10:50:21-07:00
Authentication code: 8675308
Location: Russia, Saint-Petersburg

Re: fails on monochrome XPM image: not enough pixel data

Post by Hubbitus »

Thank you. Could you please give link to commit or at least commit hash?
Post Reply