Enum IcnsEntryEncoding
How an ICNS entry's pixels are stored.
public enum IcnsEntryEncoding
Fields
Argb = 2Run-length encoded alpha, red, green and blue planes after an
ARGBtag.Indexed = 4The old 1, 4 or 8-bit icons on the Mac OS system palette, with alpha from the matching 1-bit mask.
Jpeg2000 = 1A whole JPEG 2000 file or codestream.
Png = 0A whole PNG file.
Rgb = 3Run-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}");
}