IccProfile Class

An immutable, uncompressed ICC color profile.

public sealed class IccProfile

Remarks

A profile labels the pixels of an image: it is preserved by decoders, encoders and conversions, and never applied implicitly. Colors are converted only on request, by ImageProcessingExtensions.ConvertColorProfile for an image or by IccColorTransform for sample buffers. A profile is only kept on an image when its IccProfile.ColorSpace is compatible with the pixels it describes (a grayscale profile for grayscale pixels, an RGB profile for color pixels); incompatible combinations are rejected unless the caller explicitly discards the profile.

The properties expose the header fields as declared, without validating the profile: a profile shorter than an ICC header (128 bytes) reports IccProfileColorSpace.Unknown, IccProfileClass.Unknown, version 0.0.0 and no rendering intent.

Constructors

NameDescription
IccProfile(MetadataBlob)Initializes a new instance of the IccProfile class.

IccProfile(MetadataBlob)

IccProfile.cs

Initializes a new instance of the IccProfile class.

public IccProfile(MetadataBlob data)

Parameters

data MetadataBlob
The uncompressed ICC profile bytes. The full structure is validated when serialized.

Exceptions

ArgumentNullException
data is null.

Properties

NameDescription
Cgats001CompatibleCmykGets a CMYK profile for web offset printing on coated paper, compatible with the CGATS TR 001 characterization data: the color space assumed by default for CMYK samples without profile (see CmykConversionOptions.AssumedSourceProfile).
CicpGets the CICP color description of the cicp tag (ICC.1:2022, profile version 4.4), or null when the profile has none or it is malformed.
ColorSpaceGets the data color space declared in the profile header.
DataGets the raw profile bytes.
DisplayP3Gets the Display P3 profile (https://www.w3.org/TR/css-color-4/#predefined-display-p3): the DCI-P3 primaries with the D65 white point and the sRGB transfer function, the wide-gamut color space of the screens of the phones and of the computers. It is a version 4 matrix-based display profile, built as IccProfile.Srgb.
ProfileClassGets the profile/device class declared in the profile header.
RenderingIntentGets the rendering intent declared in the profile header, or null when the header is missing or declares an undefined value. This is the intent the profile creator suggests; it does not restrict the intents the profile supports.
SrgbGets the sRGB profile (IEC 61966-2-1): the color space of untagged RGB pixels. It is a version 4 matrix-based display profile whose primaries are adapted to the D50 illuminant of the profile connection space.
SrgbGrayGets the grayscale counterpart of IccProfile.Srgb: the sRGB transfer function and white point. It is the color space of untagged grayscale pixels.
VersionGets the profile version declared in the profile header (major, minor and bug fix numbers), such as 2.4.0 or 4.4.0.

Cgats001CompatibleCmyk

IccProfile.cs

Gets a CMYK profile for web offset printing on coated paper, compatible with the CGATS TR 001 characterization data: the color space assumed by default for CMYK samples without profile (see CmykConversionOptions.AssumedSourceProfile).

public static IccProfile Cgats001CompatibleCmyk { get; }

Property value

IccProfile

Remarks

The profile is CGATS001Compat-v2-micro.icc of the Compact ICC Profiles collection by Clinton Ingram (https://github.com/saucecontrol/Compact-ICC-Profiles), released to the public domain (CC0-1.0) and stored unmodified: a version 2 input profile of 8,464 bytes.

It only describes the conversion from CMYK (one perceptual table of 6 points per ink): it can be the source of a conversion with any rendering intent, never its destination. Its small table reproduces the overall appearance of the printing condition, not the exact colors of a full-size press profile.

Gets the CICP color description of the cicp tag (ICC.1:2022, profile version 4.4), or null when the profile has none or it is malformed.

public CicpColorDescription? Cicp { get; }

Property value

CicpColorDescription?

Remarks

The tag describes the color space of the profile with the code points of Rec. ITU-T H.273. A profile of high dynamic range samples (the PQ and HLG transfer characteristics) is an approximation of the functions the tag names: ImageProcessingExtensions.ConvertColorProfile converts the samples of an image labeled with such a profile from the color space of the tag, as for an image whose ImageMetadata.Cicp describes them.

ColorSpace

IccProfile.cs

Gets the data color space declared in the profile header.

public IccProfileColorSpace ColorSpace { get; }

Property value

IccProfileColorSpace

Gets the raw profile bytes.

public MetadataBlob Data { get; }

Property value

MetadataBlob

DisplayP3

IccProfile.cs

Gets the Display P3 profile (https://www.w3.org/TR/css-color-4/#predefined-display-p3): the DCI-P3 primaries with the D65 white point and the sRGB transfer function, the wide-gamut color space of the screens of the phones and of the computers. It is a version 4 matrix-based display profile, built as IccProfile.Srgb.

public static IccProfile DisplayP3 { get; }

Property value

IccProfile

ProfileClass

IccProfile.cs

Gets the profile/device class declared in the profile header.

public IccProfileClass ProfileClass { get; }

Property value

IccProfileClass

RenderingIntent

IccProfile.cs

Gets the rendering intent declared in the profile header, or null when the header is missing or declares an undefined value. This is the intent the profile creator suggests; it does not restrict the intents the profile supports.

public IccRenderingIntent? RenderingIntent { get; }

Property value

IccRenderingIntent?

Gets the sRGB profile (IEC 61966-2-1): the color space of untagged RGB pixels. It is a version 4 matrix-based display profile whose primaries are adapted to the D50 illuminant of the profile connection space.

public static IccProfile Srgb { get; }

Property value

IccProfile

Gets the grayscale counterpart of IccProfile.Srgb: the sRGB transfer function and white point. It is the color space of untagged grayscale pixels.

public static IccProfile SrgbGray { get; }

Property value

IccProfile

Gets the profile version declared in the profile header (major, minor and bug fix numbers), such as 2.4.0 or 4.4.0.

public Version Version { get; }

Property value

Version