Error in TIF file

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
wasabi
Posts: 1
Joined: 2013-03-18T10:32:12-07:00
Authentication code: 6789

Error in TIF file

Post by wasabi »

This TIF file is generated by some old crappy software. I recognize that. But it's a bit late for that. I'd like to get it working so I can run it through ImageMagick and get a better TIF out.

https://docs.google.com/file/d/0Bz69ubg ... sp=sharing

I have a lot of them. They variously get errors about unknown field codes. Or bad scan line stuff. Or various other things:

convert.im6: Unknown field with tag 33000 (0x80e8) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/768.
convert.im6: Depreciated and troublesome old-style JPEG compression mode, please convert to new-style JPEG compression and notify vendor of writing software. `OJPEGSetupDecode' @ warning/tiff.c/TIFFWarnings/768.
convert.im6: Improper call to JPEG library in state 0. `LibJpeg' @ error/tiff.c/TIFFErrors/508.

Or, another one:

convert.im6: Unknown field with tag 33000 (0x80e8) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/768.
convert.im6: Can not read TIFF directory count. `TIFFFetchDirectory' @ error/tiff.c/TIFFErrors/508.
convert.im6: Failed to read directory at offset 15811. `TIFFReadDirectory' @ error/tiff.c/TIFFErrors/508.
punith8626
Posts: 16
Joined: 2016-12-29T05:13:36-07:00
Authentication code: 1151

Re: Error in TIF file

Post by punith8626 »

Any update on this issue ?

If I use any online converters like laserfiche or coolutils then it will convert,But If I use Image magic convert then i get Black image
Anything we can do with image magic ?

Here is the error message I get :
convert.im6: Depreciated and troublesome old-style JPEG compression mode, please convert to new-style JPEG compression and notify vendor of writing software. `OJPEGSetupDecode' @ warning/tiff.c/TIFFWarnings/768.
convert.im6: Missing JPEG tables. `OJPEGReadHeaderInfoSecTablesQTable' @ error/tiff.c/TIFFErrors/508.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Error in TIF file

Post by fmw42 »

IM uses libjpeg for processing JPEG files and libtif for processing tif files. You are likely using JPEG compression in your TIFF file and that JPEG compression is an older out-of-data compression style that is not supported by the current libtif or perhaps libjpeg.

I do not know what you can do to deal with this. One of the IM developers will need to comment.

Perhaps search the IM forum archives. I think this might have been answered before.

Please always provide your IM version and platform and in this case your libjpeg and libtiff versions. Also supply an example input image and your exact command line.

See viewtopic.php?f=1&t=9620
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Error in TIF file

Post by magick »

We can convert your image and get expected results. We're using ImageMagick 6.9.7-0 and libtiff version 4.0.7.
punith8626
Posts: 16
Joined: 2016-12-29T05:13:36-07:00
Authentication code: 1151

Re: Error in TIF file

Post by punith8626 »

Here you can find the file.
000112A1.TIF

I am using Image magic with version ImageMagick-6.8.9-Q16 on windows 7 and libtiff with version 3.9.0

I get below error message when i try to convert

Code: Select all

convert.exe: ASCII value for tag "DateTime" contains null byte in value; value incorrectly truncated during reading due to implementation limitations. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/857.
convert.exe: ASCII value for tag "Artist" contains null byte in value; value incorrectly truncated during reading due to implementation limitations. `TIFFFetchNormalTag' @ warning/tiff.c/TIFFWarnings/857.
convert.exe: Depreciated and troublesome old-style JPEG compression mode, please convert to new-style JPEG compression and notify vendor of writing software. `OJPEGSetupDecode' @ warning/tiff.c/TIFFWarnings/857.
convert.exe: Missing JPEG tables. `OJPEGReadHeaderInfoSecTablesQTable' @ error/tiff.c/TIFFErrors/561.

Here is the command that i have used.
convert C:\Projects\000112A0.TIF C:\Projects\test.tif
Last edited by punith8626 on 2017-01-03T05:55:46-07:00, edited 1 time in total.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Error in TIF file

Post by magick »

000112A1.TIF does not return expected results, unless expected results is an all black image. The problem is with the image file or within the libtiff delegate library. ImageMagick call the libTIFF API and requests the pixel values, libTIFF returns all black results. We tried your image with tiff2pdf which is included with the TIFF distribution and it failed as well:

Code: Select all

tiff2pdf 000112A1.TIF 
TIFFFetchNormalTag: Warning, ASCII value for tag "DateTime" contains null byte in value; value incorrectly truncated during reading due to implementation limitations.
TIFFFetchNormalTag: Warning, ASCII value for tag "Artist" contains null byte in value; value incorrectly truncated during reading due to implementation limitations.
TIFFFetchNormalTag: Warning, ASCII value for tag "DateTime" contains null byte in value; value incorrectly truncated during reading due to implementation limitations.
TIFFFetchNormalTag: Warning, ASCII value for tag "Artist" contains null byte in value; value incorrectly truncated during reading due to implementation limitations.
TIFFFetchNormalTag: Warning, ASCII value for tag "DateTime" contains null byte in value; value incorrectly truncated during reading due to implementation limitations.
TIFFFetchNormalTag: Warning, ASCII value for tag "Artist" contains null byte in value; value incorrectly truncated during reading due to implementation limitations.
TIFFFetchNormalTag: Warning, ASCII value for tag "DateTime" contains null byte in value; value incorrectly truncated during reading due to implementation limitations.
TIFFFetchNormalTag: Warning, ASCII value for tag "Artist" contains null byte in value; value incorrectly truncated during reading due to implementation limitations.
tiff2pdf: Missing JPEGProc field in OJPEG image 000112A1.TIF.
tiff2pdf: An error occurred creating output PDF file.
Its possible that if you find a way old version of the TIFF delegate library, it may read your image. For further help, post this image to the libTIFF forums.
punith8626
Posts: 16
Joined: 2016-12-29T05:13:36-07:00
Authentication code: 1151

Re: Error in TIF file

Post by punith8626 »

If there is some problem with image file then it should not work using online converters right?
I have tried with coolutils and laserfiche there it converts perfectly.

Could you please let me konw the forum URL of libtiff ?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Error in TIF file

Post by fmw42 »

punith8626
Posts: 16
Joined: 2016-12-29T05:13:36-07:00
Authentication code: 1151

Re: Error in TIF file

Post by punith8626 »

I am having windows application will

Code: Select all

libtiff
works on windows too ?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Error in TIF file

Post by magick »

ImageMagick uses a modern release of the libtiff delegate library which does not support reading your image, The online converters may use an older version of libtiff that can read your image or perhaps they are using a different library to read the TIFF image.
punith8626
Posts: 16
Joined: 2016-12-29T05:13:36-07:00
Authentication code: 1151

Re: Error in TIF file

Post by punith8626 »

How can we check compression mode of image file in Imagemagic command prompt ?
How can I check the file is old-style JPEG compression mode?
If compression method is JPEG then do something else do other..
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Error in TIF file

Post by fmw42 »

If Imagemagick cannot read your file, then you cannot check the compression. If it can read the file, then all available information can be found using

Code: Select all

identify -verbose yourimage
But it will only say the compression is JPEG. One way to know it is old, is if IM cannot read your file.
punith8626
Posts: 16
Joined: 2016-12-29T05:13:36-07:00
Authentication code: 1151

Re: Error in TIF file

Post by punith8626 »

If I use above command to check file compression it will take more time to output entire information(It Depends on File size).
Post Reply