[comp.graphics] Trouble with TIFF format

raja@bombay.cps.msu.edu (Narayan S. Raja) (12/06/90)

We have a MacIIfx used for color imaging 
using a camera or a flatbed scanner.  We 
can save the images in TIFF format.  The
problem is that we're having trouble
converting to any other image format
(which we need to do for further processing
on our Suns).  I have tried conversion
using libtiff (tiff2ras), pbmplus (tifftopgm), 
fbm (tiff2fbm), and ImageMagick (TIFFtoMIFF) 
filters.  In all cases, the trouble seems to 
be due to:   
                
        a. Unsupported feature: Unknown Tag
        b. Missing StripByteCounts

The unknown tag is apparently 43314 (0xa932).

The version of libtiff we have is for
TIFF revision 5.0

Here is the tiffdump info for a typical
438 X 291 8-bit color image:

------------------------------------
chroma> /home/surya/raja/X/tmp/tiff/tools/tiffdump Geese.tiff
Magic: 0x4d4d <big-endian> Version: 0x2a
Directory 0: offset 8 (0x8)
OldSubFileType (255) SHORT (3) 1<1>
ImageWidth (256) SHORT (3) 1<438>
ImageLength (257) SHORT (3) 1<291>
BitsPerSample (258) SHORT (3) 1<8>
Photometric (262) SHORT (3) 1<0>
StripOffsets (273) LONG (4) 1<768>
43314 (0xa932) LONG (4) 1<256>
------------------------------------

Any ideas?  Email preferred... thanks in
advance,


Narayan Sriranga Raja.
raja@cpswh.cps.msu.edu

clunie@ohsuhcx.ohsu.edu (David) (12/11/90)

I have not played with libtiff in a while, but I seem to remember that any
thing that uses this library, which includes most sun stuff, I think
even including Sun's own sunvision product, fails on a lot of tiff files
imported from the mac and pc world. The reason being that many mac 
based programs ignore the recommendation in the Tiff specification that
says one should try not to output entire images as one long "strip" in
tiff parlance. These programs (and I hate to admit, some of my own) take
a shortcut by owriting a single StripOffset tag into the IFD with its value
being a pointer to the start of the entire image. They may not even bother
writing a StripByteCount tag. My interrpretation of the standard is that
this is legal, though not recommended.

What the unknown tag is, I don't know, presumably it is something the scanner
manufacturer has allocated for his own use.

I have posted this rather than mailed it to you, in the hope that other people
using the tiff format may care to comment on this practice of writing one
long strip, and whether or not libtiff should support it (if this is indeed
the problem here).

Regards ... David Clunie (clunie@ohsu.edu)