Page 1 of 1

Cannot read TIFF header

Posted: 2012-11-15T16:08:20-07:00
by cclarke
I am trying to convert a fax (tif) to PDF but imagemagick is giving the following exciption:

Cannot read TIFF header. `C:/Windows/TEMP/magick-TGNQSxjt' @ warning/tiff.c/TIFFErrors/494

System:
Windows 7
ImageMagick 6.8.0-4 2012-10-30 Q16

I ran "c:\pdf>identify -verbose title.tif" to check what is i happening this was the out put:

Any ideas????

Code: Select all

Image: title.tif
  Format: TIFF (Tagged Image File Format)
  Class: DirectClass
  Geometry: 1728x2217+0+0
  Resolution: 204x196
  Print size: 8.47059x11.3112
  Units: PixelsPerInch
  Type: Bilevel
  Base type: Bilevel
  Endianess: LSB
  Colorspace: Gray
  Depth: 1-bit
  Channel depth:
    gray: 1-bit
  Channel statistics:
    Gray:
      min: 0 (0)
      max: 1 (1)
      mean: 0.986024 (0.986024)
      standard deviation: 0.117391 (0.117391)
      kurtosis: 66.565
      skewness: -8.2804
  Colors: 2
  Histogram:
     53542: (  0,  0,  0) #000000 gray(0,0,0)
   3777434: (255,255,255) #FFFFFF gray(255,255,255)
  Rendering intent: Undefined
  Gamma: 1
  Interlace: None
  Background color: gray(255,255,255)
  Border color: gray(223,223,223)
  Matte color: gray(189,189,189)
  Transparent color: gray(0,0,0)
  Compose: Over
  Page geometry: 1728x2217+0+0
  Dispose: Undefined
  Iterations: 0
  Scene: 0 of 3
  Compression: Group4
  Orientation: TopLeft
  Properties:
    date:create: 2012-11-14T16:08:08-08:00
    date:modify: 2012-11-14T16:08:08-08:00
    signature: bd998a4480469c1647b1f675b412232211bd0fa1f03009e40d59840b7823ce5a
    tiff:endian: lsb
    tiff:photometric: min-is-white
    tiff:rows-per-strip: 2217
    tiff:software: Windows NT Fax Server
  Artifacts:
    filename: title.tif
    verbose: true
  Tainted: False
  Filesize: 51.9KB
  Number pixels: 3.831M
  Pixels per second: 35.15MB
  User time: 0.094u
  Elapsed time: 0:01.109
  Version: ImageMagick 6.8.0-4 2012-10-30 Q16 http://www.imagemagick.org
Image: title.tif
  Format: TIFF (Tagged Image File Format)
  Class: DirectClass
  Geometry: 1728x2217+0+0
  Resolution: 204x196
  Print size: 8.47059x11.3112
  Units: PixelsPerInch
  Type: Bilevel
  Base type: Bilevel
  Endianess: LSB
  Colorspace: Gray
  Depth: 1-bit
  Channel depth:
    gray: 1-bit
  Channel statistics:
    Gray:
      min: 0 (0)
      max: 1 (1)
      mean: 0.989641 (0.989641)
      standard deviation: 0.101251 (0.101251)
      kurtosis: 91.5451
      skewness: -9.67187
  Colors: 2
  Histogram:
     39685: (  0,  0,  0) #000000 gray(0,0,0)
   3791291: (255,255,255) #FFFFFF gray(255,255,255)
  Rendering intent: Undefined
  Gamma: 1
  Interlace: None
  Background color: gray(255,255,255)
  Border color: gray(223,223,223)
  Matte color: gray(189,189,189)
  Transparent color: gray(0,0,0)
  Compose: Over
  Page geometry: 1728x2217+0+0
  Dispose: Undefined
  Iterations: 0
  Scene: 1 of 3
  Compression: Group4
  Orientation: TopLeft
  Properties:
    date:create: 2012-11-14T16:08:08-08:00
    date:modify: 2012-11-14T16:08:08-08:00
    signature: e7615381c8c317a2c2f5ff8fb439c027d5dab8e1e21916d543b0fca10b3891b1
    tiff:endian: lsb
    tiff:photometric: min-is-white
    tiff:rows-per-strip: 2217
    tiff:software: Windows NT Fax Server
  Artifacts:
    filename: title.tif
    verbose: true
  Tainted: False
  Filesize: 51.9KB
  Number pixels: 3.831M
  Pixels per second: 1.462MB
  User time: 2.761u
  Elapsed time: 0:03.621
  Version: ImageMagick 6.8.0-4 2012-10-30 Q16 http://www.imagemagick.org
Image: title.tif
  Format: TIFF (Tagged Image File Format)
  Class: DirectClass
  Geometry: 1728x2217+0+0
  Resolution: 204x196
  Print size: 8.47059x11.3112
  Units: PixelsPerInch
  Type: Bilevel
  Base type: Bilevel
  Endianess: LSB
  Colorspace: Gray
  Depth: 1-bit
  Channel depth:
    gray: 1-bit
  Channel statistics:
    Gray:
      min: 0 (0)
      max: 1 (1)
      mean: 0.996765 (0.996765)
      standard deviation: 0.0567845 (0.0567845)
      kurtosis: 304.127
      skewness: -17.4965
  Colors: 2
  Histogram:
     12393: (  0,  0,  0) #000000 gray(0,0,0)
   3818583: (255,255,255) #FFFFFF gray(255,255,255)
  Rendering intent: Undefined
  Gamma: 1
  Interlace: None
  Background color: gray(255,255,255)
  Border color: gray(223,223,223)
  Matte color: gray(189,189,189)
  Transparent color: gray(0,0,0)
  Compose: Over
  Page geometry: 1728x2217+0+0
  Dispose: Undefined
  Iterations: 0
  Scene: 2 of 3
  Compression: Group4
  Orientation: TopLeft
  Properties:
    date:create: 2012-11-14T16:08:08-08:00
    date:modify: 2012-11-14T16:08:08-08:00
    signature: c082cb35deeca79ab04faa1bbf6e31cffe67bb2610b4fec2cd11b8ab29b6ccf2
    tiff:endian: lsb
    tiff:photometric: min-is-white
    tiff:rows-per-strip: 2217
    tiff:software: Windows NT Fax Server
  Artifacts:
    filename: title.tif
    verbose: true
  Tainted: False
  Filesize: 51.9KB
  Number pixels: 3.831M
  Pixels per second: 744KB
  User time: 5.460u
  Elapsed time: 0:06.149
  Version: ImageMagick 6.8.0-4 2012-10-30 Q16 http://www.imagemagick.org
identify.exe: Unknown field with tag 292 (0x124) encountered. `TIFFReadDirectory
' @ warning/tiff.c/TIFFWarnings/824.
identify.exe: Unknown field with tag 40001 (0x9c41) encountered. `TIFFReadDirect
ory' @ warning/tiff.c/TIFFWarnings/824.
identify.exe: Unknown field with tag 40002 (0x9c42) encountered. `TIFFReadDirect
ory' @ warning/tiff.c/TIFFWarnings/824.
identify.exe: Unknown field with tag 40003 (0x9c43) encountered. `TIFFReadDirect
ory' @ warning/tiff.c/TIFFWarnings/824.
identify.exe: Unknown field with tag 40005 (0x9c45) encountered. `TIFFReadDirect
ory' @ warning/tiff.c/TIFFWarnings/824.
identify.exe: Unknown field with tag 40046 (0x9c6e) encountered. `TIFFReadDirect
ory' @ warning/tiff.c/TIFFWarnings/824.
identify.exe: Unknown field with tag 40047 (0x9c6f) encountered. `TIFFReadDirect
ory' @ warning/tiff.c/TIFFWarnings/824.
identify.exe: Unknown field with tag 40048 (0x9c70) encountered. `TIFFReadDirect
ory' @ warning/tiff.c/TIFFWarnings/824.
identify.exe: Unknown field with tag 40049 (0x9c71) encountered. `TIFFReadDirect
ory' @ warning/tiff.c/TIFFWarnings/824.
identify.exe: Unknown field with tag 40051 (0x9c73) encountered. `TIFFReadDirect
ory' @ warning/tiff.c/TIFFWarnings/824.
identify.exe: Unknown field with tag 40052 (0x9c74) encountered. `TIFFReadDirect
ory' @ warning/tiff.c/TIFFWarnings/824.
identify.exe: Unknown field with tag 40053 (0x9c75) encountered. `TIFFReadDirect
ory' @ warning/tiff.c/TIFFWarnings/824.
identify.exe: ASCII value for tag "Software" contains null byte in value; value
incorrectly truncated during reading due to implementation limitations. `TIFFFet
chNormalTag' @ warning/tiff.c/TIFFWarnings/824.
identify.exe: Unknown field with tag 292 (0x124) encountered. `TIFFReadDirectory
' @ warning/tiff.c/TIFFWarnings/824.
identify.exe: ASCII value for tag "Software" contains null byte in value; value
incorrectly truncated during reading due to implementation limitations. `TIFFFet
chNormalTag' @ warning/tiff.c/TIFFWarnings/824.
identify.exe: Unknown field with tag 292 (0x124) encountered. `TIFFReadDirectory
' @ warning/tiff.c/TIFFWarnings/824.
identify.exe: ASCII value for tag "Software" contains null byte in value; value
incorrectly truncated during reading due to implementation limitations. `TIFFFet
chNormalTag' @ warning/tiff.c/TIFFWarnings/824.

Re: Cannot read TIFF header

Posted: 2012-11-15T16:33:51-07:00
by fmw42
I believe that most of those messages in your identify command are just warnings that there are Tiff tags that IM does not know about. Any one can put in custom tags. These messages are just warnings and should not affect the convert. Does convert work?

The only message that might concern me is the last one:

identify.exe: ASCII value for tag "Software" contains null byte in value; value
incorrectly truncated during reading due to implementation limitations. `TIFFFet
chNormalTag' @ warning/tiff.c/TIFFWarnings/824.


That would indicate a malformed header.

If the convert works, then ignore it. If not, then check into the file to be sure it is not corrupt.

Re: Cannot read TIFF header

Posted: 2012-11-15T16:50:25-07:00
by cclarke
Yes the convert did actually work...

Is there away to suppress the warnings?

The final implementation will be to execute this via php cli on a IIS webserver

Re: Cannot read TIFF header

Posted: 2012-11-15T18:35:59-07:00
by fmw42
cclarke wrote:Yes the convert did actually work...

Is there away to suppress the warnings?

The final implementation will be to execute this via php cli on a IIS webserver

See -quiet at http://www.imagemagick.org/Usage/basics/#controls