Table of Contents

Enum IcnsEntryEncoding

Namespace
Egami.Formats.Icns
Assembly
Egami.dll

How an ICNS entry's pixels are stored.

public enum IcnsEntryEncoding

Fields

Argb = 2

Run-length encoded alpha, red, green and blue planes after an ARGB tag.

Indexed = 4

The old 1, 4 or 8-bit icons on the Mac OS system palette, with alpha from the matching 1-bit mask.

Jpeg2000 = 1

A whole JPEG 2000 file or codestream.

Png = 0

A whole PNG file.

Rgb = 3

Run-length encoded red, green and blue planes, with alpha from the matching 8-bit mask entry when there is one.

Examples

// Probe reads only the elements: how many images an icon family holds, without decoding a pixel.
RasterInfo info = Raster.Probe("app.icns");
Console.WriteLine($"{info.ImageCount} entries; Load gives {info.Width}×{info.Height}");
using Raster best = Raster.Load("app.icns");
foreach (IcnsEntry entry in ((IcnsDetails)best.Metadata.FormatDetails!).Entries)
{
    Console.WriteLine($"{entry.Type}: {entry.Width}×{entry.Height}, {entry.BitsPerPixel} bits, {entry.Encoding}");
}