Re: TIFF header [message #8767] |
Tue, 22 April 1997 00:00 |
Christian Soeller
Messages: 46 Registered: August 1996
|
Member |
|
|
<hsiacc@biomech2.ME.Berkeley.EDU> writes:
> Is the header 198 bytes for the above case?
> Is the header at the beginning of the file?
> Is the whole header located in consecutive bytes at one place in the file
> (I understand that tiff headers can be broken up at different parts of the
> file)?
The tiff format is a bit more complicated than a simple header/image_data
format. The basic unit is a tiff-directory that holds a listing of all the
information you can access. The image data is treated as one piece of
information just as is other info as image_width, image_height, ....
To get an idea of the structure of a directory and how to find the image
data in a tiff file you should check
http://rushmore.jpl.nasa.gov/~ndr/tiff/
and pointers therein.
And beware, image data is not necessarily stored contigously in tiffs. It
can be tiled, organised in strips and even compressed. The thing you are
trying to do is, generally speaking, highly non-trivial. Due to the
abundance of issues involved in storing/accessing tiffs there exists a
C library to help get at your image data (check above URL).
Christian
|
|
|