TiffEncodeOptions
The settings of a TIFF encode (#184), for ImageKodec.encodeTiff, ImageKodec.encodeTiff16 and ImageKodec.encodeTiffCmyk. The defaults give the bytes the calls without options give.
Compression, photometric and depth must fit together: the CCITT compressions take a bi-level page only (and TiffPhotometric.Auto then means bi-level), TiffCompression.Jpeg takes 8-bit gray or colour without alpha, and a palette or bi-level page takes 8-bit pixels. A combination that does not fit throws IllegalArgumentException from the encode, naming it.
Throws
if a value is out of its range, or tiles are asked for together with rowsPerStrip
Constructors
Properties
how each strip or tile is compressed.
the kind of samples written.
difference each sample from the one to its left first (TIFF Predictor 2), which makes LZW and Deflate smaller on photographs. Used with TiffCompression.Lzw and TiffCompression.Deflate on samples of 8 or 16 bits, and never on palette indices; ignored otherwise.
0 to 100, higher is better: the JPEG quality, as ImageKodec.encodeJpeg reads it (0 is read as 1). From 91 up the chroma is kept whole (YCbCr 4:4:4), below it is halved both ways (4:2:0). Used by TiffCompression.Jpeg only.
the rows in each strip, or 0 for strips of about 8 KiB of samples, as the calls without options write. A JPEG strip that is not the last must hold a whole number of rows of blocks: a multiple of 16 rows at 4:2:0 and of 8 at 4:4:4.
the height of each tile, a positive multiple of 16, or 0 to write strips. The tiles at the right and bottom edges are written whole, padded with zero samples (or, under JPEG, with the edge pixels).