Possibly buggy png produces buggy pdf (using convert)
Posted: 2008-10-06T13:20:34-07:00
Hello,
I am using ImageMagick 6.3.7 02/19/08 Q16 on Ubuntu 8.04 x86 desktop. Installed using Synaptic package imagemagick 7:6.3.7.9.dfsg1-2ub.
To reproduce the bug, download the following files (both white 1024x768 images)
http://agora.ulaval.ca/~panoe14/fail.png
http://agora.ulaval.ca/~panoe14/success.png
then enter
This will produce
http://agora.ulaval.ca/~panoe14/fail.pdf
http://agora.ulaval.ca/~panoe14/success.pdf
The file success.pdf is ok. The file fail.pdf can successfully be opened with kghostview, kpdf or evince. However, printers don't like it and Adobe Reader 8 (linux version, although the windows one gives a similar message) gives "There was an error processing a page. There was a problem reading this document (14).".
Both fail.png and success.png works fine on every viewers I tried, including windows ones. Under GIMP, both files have the same image properties except for file size 4.20 KB vs 3.36 KB and size in memory 7.78 MB vs 7.03 MB for fail.png vs success.png.
The file "fail.png" has a complex origin. It has first been produced by MATLAB (which is known to produce buggy files) then some treatment has been done on it using imagemagick (this is the "previous treatment" I talk about later). For the purpose of this bug report, the content has been removed using GIMP, leaving a white picture. The file "success.png" has been produced using GIMP by creating a new image with the same properties as "fail.png". Note that the bug remains after converting fail.png to fail.bmp then back to fail2.png.
I see possibly 2 bugs for imagemagick here:
1) If fail.png is indeed buggy (although it seems to work fine everywhere), its "buggyness" might have been caused by imagemagick in the "previous treatment". This is not sure since MATLAB can also be the cause (likely).
2) If fail.png is not buggy, it has some properties that are badly handled by Imagemagick when converting to pdf. If fail.png is buggy, imagemagick fails to see and correct it.
If you realize "what is wrong with fail.png", I would appreciate if you could let me know. This could allow me to correct the problem with my files...
Thanks,
Pierre-André Noël
I am using ImageMagick 6.3.7 02/19/08 Q16 on Ubuntu 8.04 x86 desktop. Installed using Synaptic package imagemagick 7:6.3.7.9.dfsg1-2ub.
To reproduce the bug, download the following files (both white 1024x768 images)
http://agora.ulaval.ca/~panoe14/fail.png
http://agora.ulaval.ca/~panoe14/success.png
then enter
Code: Select all
convert fail.png pdf:fail.pdf
convert success.png pdf:success.pdf
http://agora.ulaval.ca/~panoe14/fail.pdf
http://agora.ulaval.ca/~panoe14/success.pdf
The file success.pdf is ok. The file fail.pdf can successfully be opened with kghostview, kpdf or evince. However, printers don't like it and Adobe Reader 8 (linux version, although the windows one gives a similar message) gives "There was an error processing a page. There was a problem reading this document (14).".
Both fail.png and success.png works fine on every viewers I tried, including windows ones. Under GIMP, both files have the same image properties except for file size 4.20 KB vs 3.36 KB and size in memory 7.78 MB vs 7.03 MB for fail.png vs success.png.
The file "fail.png" has a complex origin. It has first been produced by MATLAB (which is known to produce buggy files) then some treatment has been done on it using imagemagick (this is the "previous treatment" I talk about later). For the purpose of this bug report, the content has been removed using GIMP, leaving a white picture. The file "success.png" has been produced using GIMP by creating a new image with the same properties as "fail.png". Note that the bug remains after converting fail.png to fail.bmp then back to fail2.png.
I see possibly 2 bugs for imagemagick here:
1) If fail.png is indeed buggy (although it seems to work fine everywhere), its "buggyness" might have been caused by imagemagick in the "previous treatment". This is not sure since MATLAB can also be the cause (likely).
2) If fail.png is not buggy, it has some properties that are badly handled by Imagemagick when converting to pdf. If fail.png is buggy, imagemagick fails to see and correct it.
If you realize "what is wrong with fail.png", I would appreciate if you could let me know. This could allow me to correct the problem with my files...
Thanks,
Pierre-André Noël