TiffCompression Enum
How TiffEncoder compresses the strips or tiles of a page.
public enum TiffCompressionRemarks
Every compression but TiffCompression.Jpeg is lossless: the decoded pixels are identical whichever one is chosen. The CCITT compressions code bilevel data and require TiffPixelLayout.Bilevel; TiffCompression.Jpeg requires TiffPixelLayout.Auto. Saving with another combination fails with an ArgumentException.
Fields
| Name | Value | Description |
|---|---|---|
None | 0 | No compression: the samples are stored as they are (Compression 1). |
Deflate | 1 | Deflate, as Adobe's Compression 8 (a zlib datastream per strip). The default. |
Lzw | 2 | LZW (Compression 5), as TIFF 6.0 defines it. No predictor is written for integer samples unless TiffEncoder.Predictor selects one. |
PackBits | 3 | PackBits run lengths (Compression 32773): each row is packed separately. |
CcittModifiedHuffman | 4 | CCITT modified Huffman run lengths (Compression 2): every row is coded in one dimension and starts on a byte boundary. Requires TiffPixelLayout.Bilevel. |
CcittGroup3 | 5 | CCITT Group 3 (T.4) facsimile coding (Compression 3), in one dimension, with an end-of-line code before each row and no fill bits. Requires TiffPixelLayout.Bilevel. |
CcittGroup4 | 6 | CCITT Group 4 (T.6) facsimile coding (Compression 4): the smallest lossless output for bilevel documents. Requires TiffPixelLayout.Bilevel. |
Jpeg | 7 | Baseline JPEG (Compression 7, TIFF Technical Note 2): lossy. Each page is one strip that holds a complete JPEG datastream, grayscale for the gray pixel formats and YCbCr for the others (see TiffEncoder.JpegQuality and TiffEncoder.JpegChromaSubsampling). JPEG stores 8-bit samples without alpha: a 16-bit pixel format or a pixel that is not opaque is rejected with an UnsupportedImageFeatureException. Requires TiffPixelLayout.Auto. |