AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2003.05.06 14:54 "Decode Message : Help/", by Harring Figueiredo
2003.05.06 15:07 "RE: Decode Message : Help/", by Carter John-jcarte01
2003.05.06 15:29 "RE: Decode Message : Help ( SOLVED)", by Harring Figueiredo

2003.05.06 14:54 "Decode Message : Help/", by Harring Figueiredo

 Folks,
  I created a TIFF file using a java program that I wrote. The image I created
is based on another TIFF file.
  When I try to load the image on gqview, I get the follwoing error. (Gimp also
gives the same type of errors - see below)

 gqview Error Messages:
Fax4Decode: har.tiff: Bad code word at scanline 1 (x 55).
Fax4Decode: Warning, har.tiff: Premature EOL at scanline 1 (got 55, expected
1864).

 Gimp Error MEssages

gimp: har.tiff: Premature EOL at scanline 8 (got 1863, expected 1864)
gimp: har.tiff: Line length mismatch at scanline 13 (got 1865, expected 1864)
gimp: har.tiff: Bad code word at scanline 17 (x 1863)
gimp: har.tiff: Premature EOL at scanline 17 (got 1863, expected 1864)
gimp: har.tiff: Line length mismatch at scanline 20 (got 2265, expected 1864)
gimp: har.tiff: Line length mismatch at scanline 21 (got 1870, expected 1864)
...... [ More messages imiliar to the above line ]...

  What does that mean? ( I can load the original file OK. )

NOTE: The original file is TIFF little endian, and the one I create is TIFF Big Endian. (Perhaps will help someone spot the problem)

   Here is a tiffdump of the Files:

   ORIGINAL FILE (Loads on on gqview)

Magic: 0x4949 <little-endian> Version: 0x2a
Directory 0: offset 11552 (0x2d20) next 0 (0)
ImageWidth (256) SHORT (3) 1<1864>
ImageLength (257) SHORT (3) 1<728>
Compression (259) SHORT (3) 1<4>
Photometric (262) SHORT (3) 1<0>
StripOffsets (273) LONG (4) 1<8>
Orientation (274) SHORT (3) 1<1>
RowsPerStrip (278) SHORT (3) 1<728>
StripByteCounts (279) LONG (4) 1<11544>
XResolution (282) RATIONAL (5) 1<200>
YResolution (283) RATIONAL (5) 1<1>
PlanarConfig (284) SHORT (3) 1<1>

-----------------------------------------

  BAD IMAGE ( created by me)

Magic: 0x4d4d <big-endian> Version: 0x2a
Directory 0: offset 8 (0x8) next 0 (0)
ImageWidth (256) SHORT (3) 1<1864>
ImageLength (257) SHORT (3) 1<728>
Compression (259) SHORT (3) 1<4>
Photometric (262) SHORT (3) 1<0>
StripOffsets (273) LONG (4) 1<146>
Orientation (274) SHORT (3) 1<1>
RowsPerStrip (278) SHORT (3) 1<728>
StripByteCounts (279) LONG (4) 1<11544>
XResolution (282) RATIONAL (5) 1<200>
YResolution (283) RATIONAL (5) 1<1>
PlanarConfig (284) SHORT (3) 1<1>

  When I am copying the STRIPS (in this case, nly 1 (one), I basically do a mem
copy from the original file to the file I am creating. ( I do not have to
convert to Big endian, do I? )

I can send the images if anyone is interested.

Thank you SO MUCH for any help.

Harring Figueiredo.

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com