TIFF 6.0 Specification Coverage
The library is capable of dealing with images that are written to follow the 5.0 or 6.0 TIFF spec. There is also considerable support for some of the more esoteric portions of the 6.0 TIFF spec.
| Core requirements |
Both "MM" and "II" byte orders are handled.
Both packed and separated planar configuration of samples.
Any number of samples per pixel (memory permitting).
Any image width and height (memory permitting).
Multiple subfiles can be read and written.
Editing is not supported in that related subfiles (e.g.
a reduced resolution version of an image) are not automatically
updated.
Tags handled: ExtraSamples, ImageWidth, ImageLength, NewSubfileType, ResolutionUnit. Rowsperstrip, StripOffsets, StripByteCounts, XResolution, YResolution, |
| Tiled Images | TileWidth, TileLength, TileOffsets, TileByteCounts | Image Colorimetry Information | WhitePoint, PrimaryChromaticities, TransferFunction, ReferenceBlackWhite |
| Class B for bilevel images | SamplesPerPixel = 1 BitsPerSample = 1 Compression = 1 (none), 2 (CCITT 1D), or 32773 (PackBits) PhotometricInterpretation = 0 (Min-is-White), 1 (Min-is-Black) |
| Class G for grayscale images | SamplesPerPixel = 1 BitsPerSample = 4, 8 Compression = 1 (none) 5 (LZW) PhotometricInterpretation = 0 (Min-is-White), 1 (Min-is-Black) |
| Class P for palette color images | SamplesPerPixel = 1 BitsPerSample = 1-8 Compression = 1 (none) 5 (LZW) PhotometricInterpretation = 3 (Palette RGB) ColorMap |
| Class R for RGB full color images | SamplesPerPixel = 3 BitsPerSample = <8,8,8> PlanarConfiguration = 1, 2 Compression = 1 (none) 5 (LZW) PhotometricInterpretation = 2 (RGB) |
| Class F for facsimile | (Class B tags plus...) Compression = 3 (CCITT Group 3), 4 (CCITT Group 4) FillOrder = 1 (MSB), 2 (LSB) Group3Options = 1 (2d encoding), 4 (zero fill), 5 (2d+fill) ImageWidth = 1728, 2048, 2482 NewSubFileType = 2 ResolutionUnit = 2 (Inch), 3 (Centimeter) PageNumber, XResolution, YResolution, Software, BadFaxLines, CleanFaxData, ConsecutiveBadFaxLines, DateTime, DocumentName, ImageDescription, Orientation |
Class S for separated images | SamplesPerPixel = 4 PlanarConfiguration = 1, 2 Compression = 1 (none), 5 (LZW) PhotometricInterpretation = 5 (Separated) InkSet = 1 (CMYK) DotRange, InkNames, DotRange, TargetPrinter |
Class Y for YCbCr images | SamplesPerPixel = 3 BitsPerSample = <8,8,8> PlanarConfiguration = 1, 2 Compression = 1 (none), tionRowsPerStrip is one). Two routines are provided for scanline-based i/o: TIFFReadScanline and TIFFWriteScanline. For example, to read the contents of a file that is assumed to be organized in strips, the following might be used: Strip-oriented Image I/OThe strip-oriented interfaces provided by the library provide access to entire strips of data. Unlike the scanline-oriented calls, data can be read or written compressed or uncompressed. Accessing data at a strip (or tile) level is often desirable because there are no complications with regard to random access to data within strips.A simple example of reading an image by strips is: The above code reads strips in the order in which the data is physically stored in the file. If multiple samples are present and data is stored with PLANARCONFIG_SEPARATE then all the strips of data holding the first sample will be read, followed by strips for the second sample, etc. Finally, note that the last strip of data in an image may have fewer rows in it than specified by the RowsPerStrip tag. A reader should not assume that each decoded strip contains a full set of rows in it. The following is an example of how to read raw strips of data from a file: Tile-oriented Image I/OTiles of data may be read and written in a manner similar to strips. With this interface, an image is broken up into a set of rectangular areas that may have dimensions less than the image width and height. All the tiles in an image have the same size, and the tile width and length must each be a multiple of 16 pixels. Tiles are ordered left-to-right and top-to-bottom in an image. As for scanlines, samples can be packed contiguously or separately. When separated, all the tiles for a sample are colocated in the file. That is, all the tiles for sample 0 appear before the tiles for sample 1, etc.Tiles and strips may also be extended in a z dimension to form volumes. Data volumes are organized as "slices". That is, all the data for a slice is colocated. Volumes whose data is organized in tiles can also have a tile depth so that data can be organized in cubes. There are actually two interfaces for tiles. One interface is similar to scanlines, to read a tiled image, code of the following sort might be used: Alternatively a direct interface to the low-level data is provided a la strips. Tiles can be read with TIFFReadEncodedTile or TIFFReadRawTile, and written with TIFFWriteEncodedTile or TIFFWriteRawTile. For example, to read all the tiles in an image: Other StuffSome other stuff will almost certainly go here...
Last updated: $Date: 1999/08/13 19:30:57 $ |