OpenExrCompression Enum
The compression of the chunks of an OpenEXR file written by OpenExrEncoder.
public enum OpenExrCompressionRemarks
OpenExrCompression.None, OpenExrCompression.Rle, OpenExrCompression.Zips, OpenExrCompression.Zip and OpenExrCompression.Piz are lossless. OpenExrCompression.Pxr24, OpenExrCompression.B44, OpenExrCompression.B44A, OpenExrCompression.Dwaa and OpenExrCompression.Dwab lose precision: choosing one of them is the explicit request to lose it. The number of scan lines of a chunk applies to scan-line output; tiled output has one tile per chunk (OpenExrEncoder.Tiling).
Fields
| Name | Value | Description |
|---|---|---|
None | 0 | No compression (NO_COMPRESSION): one scan line per chunk; the output does not need a seekable destination. |
Rle | 1 | Run-length coding of byte differences (RLE_COMPRESSION), one scan line per chunk. |
Zips | 2 | zlib compression of byte differences (ZIPS_COMPRESSION), one scan line per chunk. |
Zip | 3 | zlib compression of byte differences (ZIP_COMPRESSION), 16 scan lines per chunk. This is the default. |
Piz | 4 | Wavelet and Huffman coding (PIZ_COMPRESSION), 32 scan lines per chunk: usually the smallest for photographs and noisy images. |
Pxr24 | 5 | zlib compression of sample differences (PXR24_COMPRESSION), 16 scan lines per chunk. Lossy for float samples, which are rounded to 24 bits (their 8 low mantissa bits are lost); lossless for half samples. |
B44 | 6 | Fixed-rate coding of 4×4 blocks of half samples (B44_COMPRESSION, 32 bytes to 14), 32 scan lines per chunk. Lossy for half samples, alpha included (infinities and values that are not numbers become 0); float samples are stored as they are. |
B44A | 7 | OpenExrCompression.B44, with blocks of a single value stored in 3 bytes (B44A_COMPRESSION): smaller for flat areas such as a constant alpha. |
Dwaa | 8 | DCT coding of the colors (DWAA_COMPRESSION), 32 scan lines per chunk, at the quality of OpenExrEncoder.DwaCompressionLevel. Lossy for the colors, which are stored as half values even in float samples; alpha is run-length coded without loss. |
Dwab | 9 | OpenExrCompression.Dwaa with 256 scan lines per chunk (DWAB_COMPRESSION): smaller files, chunks of a larger area. |