AuxiliaryImage Class

An image stored next to the primary image of a file: a thumbnail, a depth map, a gain map, a matte. It is borrowed from its AuxiliaryImageCollection, and decoded on demand by AuxiliaryImage.Decode.

public sealed class AuxiliaryImage

Properties

NameDescription
AuxiliaryTypeGets the type of an auxiliary image of a HEIC or AVIF file (the URN of its auxC property, such as urn:mpeg:hevc:2015:auxid:2 for a depth map), or null for an image that has none (a thumbnail, the gain map of a tone map item, an image of a JPEG file).
GainMapMetadataGets the parameters of a gain map, or null when the image is not a gain map, when the file does not give them (a gain map of Apple without ISO 21496-1 metadata), or when they cannot be read.
KindGets what the image is.
SizeGets the size of the image: for a HEIF item, after its clean aperture and before its orientation, as ImageInfo.Size (its ispe property when the item cannot be decoded); for a JPEG image, the size of its frame header.

AuxiliaryType

AuxiliaryImage.cs

Gets the type of an auxiliary image of a HEIC or AVIF file (the URN of its auxC property, such as urn:mpeg:hevc:2015:auxid:2 for a depth map), or null for an image that has none (a thumbnail, the gain map of a tone map item, an image of a JPEG file).

public string? AuxiliaryType { get; }

Property value

string?

GainMapMetadata

AuxiliaryImage.cs

Gets the parameters of a gain map, or null when the image is not a gain map, when the file does not give them (a gain map of Apple without ISO 21496-1 metadata), or when they cannot be read.

public GainMapMetadata? GainMapMetadata { get; }

Property value

GainMapMetadata?

Gets what the image is.

public AuxiliaryImageKind Kind { get; }

Property value

AuxiliaryImageKind

Gets the size of the image: for a HEIF item, after its clean aperture and before its orientation, as ImageInfo.Size (its ispe property when the item cannot be decoded); for a JPEG image, the size of its frame header.

public Size Size { get; }

Property value

Size

Methods

NameDescription
Decode(ImageDecodeOptions?)Decodes the image.
Decode<TPixel>(ImageDecodeOptions?)Decodes the image into a pixel format.
ToString()Returns a string that represents the current object.

Decode overloads

Decode(ImageDecodeOptions?)

AuxiliaryImage.cs

Decodes the image.

public Image Decode(ImageDecodeOptions? options = null)
Parameters
options ImageDecodeOptions?
The decoding options, or null for the configuration the collection was loaded with.
Returns

Image A new image owned by the caller: a gain map, a depth map or a matte is usually a grayscale image, whose samples are the coded values.

Exceptions
InvalidImageContentException
The image is malformed.
UnsupportedImageFeatureException
The image uses a feature that is not supported.
ImageResourceLimitException
The image exceeds a resource limit.

Decode<TPixel>(ImageDecodeOptions?)

AuxiliaryImage.cs

Decodes the image into a pixel format.

public Image<TPixel> Decode<TPixel>(ImageDecodeOptions? options = null) where TPixel : unmanaged
Type parameters
TPixel
The pixel format.
Parameters
options ImageDecodeOptions?
The decoding options, or null for the configuration the collection was loaded with.
Returns

Image<TPixel> A new image owned by the caller.

Exceptions
NotSupportedException
TPixel is not a built-in pixel struct.
InvalidImageContentException
The image is malformed.
UnsupportedImageFeatureException
The image uses a feature that is not supported, or cannot be converted to TPixel.
ImageResourceLimitException
The image exceeds a resource limit.

Returns a string that represents the current object.

public override string ToString()

Returns

string A string that represents the current object.