2001.04.01 18:07 "how to force tiffcp ( or such ) to use littleendian instead of bigendian. ??", by Bård Kregnes
Hi all!
I'm using tiffcp (v 3.5.5. on solaris ) to copy a tiff-file ( this is produced on an Intel-pc with scanner) and the output file will be processed and printed from a Windoze PC which have a print system. The print system has problem with reading the tiff-file(s). IMNSHO: I suspect the there are some hardcoded stuff in the Windows sytem which has the problems.
Is there any way to force tiffcp ( or some function calls to make it use little endian)?
tiffdump from original file:
bash$ tiffdump gammelt_kort.tif
gammelt_kort.tif:
Magic: 0x4949 <little-endian> Version: 0x2a
Directory 0: offset 8 (0x8) next 0 (0)
ImageWidth (256) LONG (4)
1<1584>
ImageLength (257) LONG (4)
1<1150>
BitsPerSample (258) SHORT
(3) 1<1>
Compression (259) SHORT (3)
1<4>
Photometric (262) SHORT (3) 1<0>
ImageDescription
(270) ASCII (2) 750<FormID,00,01054;fnr,00,2 ...>
StripOffsets (273) LONG (4)
1<994>
SamplesPerPixel
(277) SHORT (3) 1<1>
RowsPerStrip (278) LONG (4)
1<1150>
StripByteCounts
(279) LONG (4) 1<5894>
XResolution (282) RATIONAL (5)
1<200>
YResolution (283) RATIONAL (5)
1<200>
PageName (285) ASCII (2)
6<014431>
Group4Options (293) LONG (4)
1<0>
ResolutionUnit (296)
SHORT (3) 1<2>
Artist (315) ASCII (2)
16<010326L014432-1\0>
tiffdump from the 'copied' file
bash$ tiffdump testen_tif.tif
testen_tif.tif:
Magic: 0x4d4d <big-endian> Version: 0x2a
Directory 0: offset 5910 (0x1716) next 0 (0)
ImageWidth (256) SHORT (3)
1<1584>
ImageLength (257) SHORT (3)
1<1150>
BitsPerSample (258) SHORT
(3) 1<1>
Compression (259) SHORT (3)
1<4>
Photometric (262) SHORT (3) 1<0>
ImageDescription
(270) ASCII (2) 739<FormID,00,01054;fnr,00,2 ...>
StripOffsets (273) LONG (4)
1<8>
SamplesPerPixel
(277) SHORT (3) 1<1>
RowsPerStrip (278) SHORT (3)
1<1150>
StripByteCounts
(279) LONG (4) 1<5901>
XResolution (282) RATIONAL (5)
1<200>
YResolution (283) RATIONAL (5)
1<200>
PlanarConfig
(284) SHORT (3) 1<1>
PageName (285) ASCII (2)
7<014431\0>
Group4Options (293) LONG (4)
1<0>
ResolutionUnit (296)
SHORT (3) 1<2>
Artist (315) ASCII (2)
16<010326L014432-1\0>
"Funny," he intoned funerally, "how just when you think life
can't possibly get any worse it suddenly does."