Table of Contents

Enum TiffPredictor

Namespace
Egami.Formats.Tiff
Assembly
Egami.dll

The horizontal differencing applied before LZW, Deflate, Zstandard or LZMA, from the Predictor tag.

public enum TiffPredictor

Fields

FloatingPoint = 3

Adobe's floating-point predictor (3): byte planes, then horizontal differences, for float samples.

Horizontal = 2

Each sample stored as the difference from the one a pixel to its left (2), for integer samples.

None = 1

No prediction (1).

Examples

// Each pixel type is written at its own depth: 16-bit color stays 16-bit. Deflate with the predictor is the default.
photo.Save("duck.tif");

// Tiles, LZW, BigTIFF, or the smallest exact form the pixels allow.
photo.Save("tiled.tif", new TiffWriterOptions { Compression = TiffCompression.Lzw, TileSize = 256, Layout = TiffLayout.Auto });
photo.Save("small.tif", new TiffWriterOptions { Reduce = true });

// JPEG inside TIFF: RGB is written as YCbCr 4:2:0 with the tables shared by every strip.
photo.Save("photo.tif", new TiffWriterOptions { Compression = TiffCompression.Jpeg, Quality = 90 });