ColorTransferFunction Enum

Identifies how the stored color samples of an image relate to light intensity (the transfer function).

public enum ColorTransferFunction

Remarks

The value labels the stored samples, like an ICC profile: pixels are never converted between transfer functions implicitly. ImageProcessingExtensions.ConvertColorProfile reads the label of an image without profile and resets it to ColorTransferFunction.Srgb. Alpha is a linear coverage value in both cases. Only QOI (its header colorspace field), JPEG XL (its color encoding) and TIFF pages of floating-point samples (linear light unless an ICC profile describes them) store the label; saving ColorTransferFunction.Linear pixels to another format, or ColorTransferFunction.Srgb floating-point pixels to TIFF without an ICC profile, follows ImageEncoder.MetadataHandling, so they are never silently relabeled.

Fields

NameValueDescription
Srgb0The color samples are sRGB encoded (gamma compressed), or described by the ICC profile when there is one. This is the default: untagged pixels are assumed sRGB (gray: sGray).
Linear1The color samples are linear light (sRGB primaries, no transfer curve), as declared by a QOI colorspace field of 1, or as the floating-point samples of a TIFF page without ICC profile are.