Table of Contents

Enum HeicItemRole

Namespace
Egami.Formats.Heic
Assembly
Egami.dll

What an item of a HEIC file is to the image Load gives.

public enum HeicItemRole

Fields

Alpha = 2

The primary image's alpha, or part of it.

Auxiliary = 4

Another auxiliary image of the primary image, such as a matte; see AuxiliaryType.

Depth = 3

A depth map of the primary image (an auxiliary image of a depth type).

Derived = 6

An image another image is made from or derived from it: a grid cell, an overlay layer, or the tmap item itself.

GainMap = 5

A gain map image: of a tone-mapped derived image (tmap), or Apple's HDRGainMap auxiliary image.

Metadata = 7

Metadata: an Exif or XMP item.

Other = 8

Anything else.

Primary = 0

The primary image, which Load gives.

Thumbnail = 1

A thumbnail of the primary image (a thmb reference).

Examples

// The other images a photo holds: thumbnails, gain maps, depth maps and mattes (portrait, skin, sky).
HeicDetails details = (HeicDetails)sdr.Metadata.FormatDetails!;
HeicItem sky = details.Items.First(i => i.AuxiliaryType == "urn:com:apple:photo:2020:aux:semanticskymatte");
using Raster matte = HeicImage.ReadItem("portrait.heic", sky.Id, context: heic);
matte.Apply(ops => ops.AutoOrient());
matte.Save("sky-matte.png");