Table of Contents

Enum TiffPhotometric

Namespace
Egami.Formats.Tiff
Assembly
Egami.dll

What a page's samples mean, from the PhotometricInterpretation tag.

public enum TiffPhotometric

Fields

BlackIsZero = 1

Gray, 0 black (1).

CieLab = 8

CIE Lab* with signed a* and b* (8).

IccLab = 9

CIE Lab* with a* and b* offset to unsigned, as ICC stores them (9).

ItuLab = 10

CIE Lab* scaled as ITU-T T.42 does (10).

LogL = 32844

SGILog luminance (32844).

LogLuv = 32845

SGILog luminance and chromaticity (32845).

Palette = 3

Indexes into a ColorMap (3).

Rgb = 2

Red, green, blue (2).

Separated = 5

Inks, usually CMYK (5).

TransparencyMask = 4

A 1-bit mask for another page (4).

WhiteIsZero = 0

Gray, 0 white (0).

YCbCr = 6

Luma and chroma (6).

Examples

using Raster page = Raster.Load("scan.tif");
TiffDetails tiff = (TiffDetails)page.Metadata.FormatDetails!;
Console.WriteLine($"page {tiff.PageIndex}: {tiff.Photometric}, {tiff.BitsPerSample}-bit, {tiff.Compression}, {tiff.ByteOrder}, {tiff.Layout}");
Console.WriteLine(tiff.TileWidth is int tile ? $"tiles of {tile}" : $"{tiff.RowsPerStrip} rows a strip");

// Tags Egami does not map are kept as they were read.
foreach (TiffTag tag in tiff.OtherTags)
{
    Console.WriteLine($"tag {tag.Id}: {tag.Count} × {tag.Type}");
}