AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2012.03.20 14:24 "[Tiff] Unable to read following tiff file", by Reg
2012.03.21 05:14 "Re: [Tiff] Unable to read following tiff file", by Frank Warmerdam
2012.03.21 11:56 "Re: [Tiff] Unable to read following tiff file", by Reg
2012.03.21 12:37 "Re: [Tiff] Unable to read following tiff file", by Joris Van Damme
2012.03.21 14:21 "Re: [Tiff] Unable to read following tiff file", by Reg

2012.03.21 11:56 "Re: [Tiff] Unable to read following tiff file", by Reg

Indeed it must have something incorrect in it.

But libtiff does not return any failure when reading it. As a matter of fact, it corrupts the image!

Still, the following software will read this file without problems:

  1. Irfanview (www.irfanview.de, free)
  2. FastStone (http://www.faststone.org, free)

2) windows imaging (eastman software)

Thank you very much
Dennis

On 21/03/2012 02:14, Frank Warmerdam wrote:

On 12-03-20 07:24 AM, Reg wrote:

Most tiff readers (not based on libtiff) can read the following file. Libtiff can not. For reTiff2rgba fails to convert it (just for reference).

What is worse it does not fail, it generates a blank image.

Could you please check?

The file is available at: http://www.infologika.com.br/public/1.tif

Dennis,

tiffinfo reports:

1.tif: Warning, Nonstandard tile width 2550, convert file.

1.tif: Warning, Nonstandard tile length 3300, convert file.

TIFFReadDirectory: Warning, Unknown field with tag 512 (0x200) encountered.

TIFFReadDirectory: Warning, Unknown field with tag 513 (0x201) encountered.

TIFFReadDirectory: Warning, Unknown field with tag 514 (0x202) encountered.

TIFFReadDirectory: Warning, Unknown field with tag 515 (0x203) encountered.

JPEGFixupTagsSubsampling: Warning, Unable to auto-correct subsampling values,

likely corrupt JPEG compressed data in first strip/tile; auto-correcting skipped.

TIFF Directory at offset 0x8 (8)
   Subfile Type: (0 = 0x0)
   Image Width: 2550 Image Length: 3300
   Tile Width: 2550 Tile Length: 3300
   Resolution: 300, 300 pixels/inch
   Bits/Sample: 8
   Compression Scheme: JPEG
   Photometric Interpretation: YCbCr
   YCbCr Subsampling: 2, 1
   YCbCr Positioning: cosited
   Orientation: row 0 top, col 0 lhs
   Samples/Pixel: 3
   Planar Configuration: single image plane

   Reference Black/White:
      0:     0   255
      1:   128   255
      2:   128   255

   Tag 512: 1
   Tag 513: 360
   Tag 514: 304240
   Tag 515: 0

This file has an illegal (as far as I understand) tile size which is not

a multiple of 8. I don't know what tags 512-515 are. When I run tiff2rgba
I see:

JPEGLib: Not a JPEG file: starts with 0xbb 0x45.

So the actual JPEG data seems broken. When I do tiffdump I discovered that

it knows tags 512-515:

JPEGProcessingMode (512) SHORT (3) 1<1>
JPEGInterchangeFormat (513) LONG (4) 1<360>
JPEGInterchangeFormatLength (514) LONG (4) 1<304240>
JPEGRestartInterval (515) SHORT (3) 1<0>

I tried extracting the jpeg data and it isn't recognised as a JFIF file or

a raw jpeg stream. So I'm not sure how other packages read it. It doesn't
seem well behaved to me.