A header structure for tiff files.
- Author:
- J.L. Mundy
- Date:
- 22 Dec 2005 This class is responsible for extracting (putting) information from (into) the tiff header that is required to specify a vil_image_resource There are bool flags that indicate that the item has been successfully read (written) to the open tiff file.
Notes:
- The size of each strip can be different and less than the full strip, i.e. bytes_per_line * rows_per_strip, would require. Perhaps this case should be rejected, but it has occurred in images that IrfanView and ImageMagick CAN read. In this case, the buffers are set up with capacity for a full strip.
- The number of rows in a strip can exceed the image length. The actual byte count is equal to the number of bytes in the image. In this case, the block size is truncated to the image_length.
- The width and height of a tile must be a multiple of 16
- The current implementation can't handle Planar Configuration =2, which is RGB in separate color bands.
- If rows_per_strip is missing, it is assumed to be infinity (http://www.awaresystems.be/imaging/tiff/tifftags/rowsperstrip.html)
Modifications
November 8, 2007 - Added the case of four planes that is necessary to
read and write satellite multispectral image data - JLM
January 9, 2012 - Use default value (1) for images that do not have SamplesPerPixel tag - GY
Definition in file vil_tiff_header.h.