Table of Contents

Class AvifItem

Namespace
Egami.Formats.Avif
Assembly
Egami.dll

An item of an AVIF file, as Items lists them.

public sealed record AvifItem : IEquatable<AvifItem>
Inheritance
AvifItem
Implements
Inherited Members

Examples

// Every item of the file, with what it is to the image Load gives: alpha, thumbnails, depth maps, grid cells, metadata.
using Raster image = Raster.Load("duck.avif");
IReadOnlyList<AvifItem> items = ((AvifDetails)image.Metadata.FormatDetails!).Items;
AvifItem primary = items.First(i => i.Role == AvifItemRole.Primary);

// Any image item decodes on its own, with its own color, such as a depth map or a thumbnail.
using Raster item = AvifImage.ReadItem("duck.avif", primary.Id);

Properties

AuxiliaryType

Gets the auxiliary type URN of an auxiliary image (auxC), or null.

public string? AuxiliaryType { get; init; }

Property Value

string

Hidden

Gets whether the item is hidden (not meant to be shown on its own).

public bool Hidden { get; init; }

Property Value

bool

Id

public uint Id { get; init; }

Property Value

uint

IsImage

Gets whether ReadItem(string, uint, ReaderOptions?, EgamiContext?) can decode it: an av01 or grid image item.

public bool IsImage { get; init; }

Property Value

bool

Role

Gets what the item is to the primary image.

public AvifItemRole Role { get; init; }

Property Value

AvifItemRole

Size

Gets the size its ispe property gives, or 0 × 0 when it has none.

public Size Size { get; init; }

Property Value

Size

Type

Gets the item type: av01, grid, iovl, tmap, Exif, mime, ...

public string Type { get; init; }

Property Value

string