"Improper Image Header" 1 bit per pixel PNG

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
anotherprogrammer123
Posts: 36
Joined: 2010-02-21T18:02:40-07:00
Authentication code: 8675308

"Improper Image Header" 1 bit per pixel PNG

Post by anotherprogrammer123 »

Hi,

I am using "ImageMagick-6.6.0-10-Q8-windows-dll" and have some problems loading PNG and TIFF files with 1-bit-per-pixel depths.

Here is a sample .png file that reproduces this error: Image
This .png file works perfectly in MS Paint, IrfanView, Windows Photo Gallery, etc.

When I run the command "imdisplay failed2.png" the image loads, but I get a weird display:
Image
When I try to save to .jpg, an empty file is written.

When I try to run "convert failed2.png fixed.bmp" the same image displayed in IMDisplay is saved (the weird barred one) and no error is returned!
Graphicksmagick however works.

Any ideas as to why this is happening?

Thanks in advance!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: "Improper Image Header" 1 bit per pixel PNG

Post by magick »

We can reproduce the problem you posted and have a patch for ImageMagick 6.6.1-0 Beta available by sometime tomorrow. Thanks.
anotherprogrammer123
Posts: 36
Joined: 2010-02-21T18:02:40-07:00
Authentication code: 8675308

Re: "Improper Image Header" 1 bit per pixel PNG

Post by anotherprogrammer123 »

Thanks!
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: "Improper Image Header" 1 bit per pixel PNG

Post by glennrp »

Should be OK in the SVN repo now. One-bit paletted PNG images were read incorrectly.

Glenn
anotherprogrammer123
Posts: 36
Joined: 2010-02-21T18:02:40-07:00
Authentication code: 8675308

Re: "Improper Image Header" 1 bit per pixel PNG

Post by anotherprogrammer123 »

Thanks for the quickness!
Post Reply