2013.05.16 02:20 "Re: [Tiff] TIFF conversion error", by tiuser Lassei
On Wed, May 15, 2013 at 9:37 PM, Bob Friesenhahn < firstname.lastname@example.org> wrote:
I have several TIFFs that I need to convert to PNG and I'm using imagemagick, which uses libtiff if i'm not mistaken, as a commandline tool in the backend.
The problem is that the some of the tiffs are experiencing an error during
>> conversion(http://www.2shared.**com/complete/vnb96t_9/error.**html<http://www.2shared.com/complete/vnb96t_9/error.html> >> ).
convert.exe: Unknown field with tag 292 (0x124) encountered.
>> `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/**824.
convert.exe: Bad code word at line 5151 of strip 0 (x 3744). `Fax4Decode' @ error/tiff.c/TIFFErrors/562.
However, the TIFF can be viewed properly in the IMDisplay and other TIFF viewers and ImageMagick's identify.exe doesn't encounter the error. The PNG image is actually generated (so far there is no noticeable rendering errors) even though the above error is encountered however my program checks the error status which will be set to non-zero and the program will mark the conversion as failed.
From my initial investigation, this seems an error related to the compression used in TIFF (and I'm thinking that the underlying libtiff is throwing this). I'm not sure if this bug is related
Though I can't find a post with the exact error as mine.
Can someone advise the cause and if the error can be ignored?
Libtiff is issuing these as warnings and ImageMagick is reporting them as warnings. The warnings are issued due to libtiff encountering tags that it does not handle (usually proprietary tags). Usually ignoring such tags is benign, but not always. I think that ImageMagick provides an option to quench these warnings. You might want to investigate that in an ImageMagick-related forum.
> email@example.com, http://www.simplesystems.org/**
> users/bfriesen/ <http://www.simplesystems.org/users/bfriesen/>
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Yes, the warnings (especially the proprietary tag related warnings) can be ignored but I'm actually concerned about the error "Bad code word at line
5151 of strip 0 (x 3744). `Fax4Decode' @ error/tiff.c/TIFFErrors/562." The
image doesn't show any image corruption when viewed in a TIFF viewer (I'm
not sure if the corruption is actually in the black border which makes it
hard to distinguish).
I'm just asking if the TIFF file is corrupted (or has an error in compression) and not a bug in the libtiff library so I can explain it more properly (since the TIFF can be viewed correctly, I would like a more specific explanation). I would also like to know if the error given is a "safe to ignore" error with regards to the output image such that the
output image is still generated and looks like the image with no noticeable difference (i'm ok even if the corruption in the source image is retained
in the output image as I also have samples of tiffs with visible corruption due to compression errors and libtiff also outputs the PNG with corruption).