1997.01.31 10:00 "Re: 16-bit TIFF?", by Niles Ritter
I have some 16-bit data from a CCD camera that was stored as a TIFF file. Only today have I learned that standard TIFF is limited to 8 bits.
The "Baseline" TIFF file is limited to 8 bits, but most TIFF readers worth their salt support at least some of the extended TIFF 6.0 features such as tiling, 16-bit etc. Adobe Photoshop can do this easy.
Is there a way to read my 16-bit TIFF files? Ideally, I'd like to have a Unix filter that could read my .tif files from standard input and write a text array to standard output, which I could redirect to a file and subsequently open with MATLAB.
If you use the libtiff libraries you could write a 20-line program that does something like this (at least for your flavor of TIFF). You will have to give the filename as an input parameter, though, since TIFF is not readily streamable as stdin. Assuming the images are not tiled, just TIFFOpen the file, TIFFGetField the image sizes and then TIFFReadScanline the data and dump it out. If the CCD camera software folks were really on the ball, they may even have set the TIFF tag that tells you whether the 2-byte pixels should be interpreted as signed or unsigned short integers.
See also my TIFF Web page at http://www-mipl.jpl.nasa.gov/~ndr/tiff/