Table of Contents

Class IcoDetails

Namespace
Egami.Formats.Ico
Assembly
Egami.dll

Details only ICO and CUR have, kept in FormatDetails.

public sealed class IcoDetails : FormatDetails
Inheritance
IcoDetails
Inherited Members

Examples

// Probe reads only the directory: the sizes an icon holds, without decoding a pixel.
RasterInfo info = Raster.Probe("app.ico");
Console.WriteLine($"{info.ImageCount} entries; Load gives {info.Width}×{info.Height}");
using Raster best = Raster.Load("app.ico");
foreach (IcoEntry entry in ((IcoDetails)best.Metadata.FormatDetails!).Entries)
{
    Console.WriteLine($"{entry.Width}×{entry.Height}, {entry.BitsPerPixel} bits, {entry.Encoding}");
}

Properties

BitsPerPixel

Gets or sets the entry's bits a pixel, as BitsPerPixel.

public int BitsPerPixel { get; set; }

Property Value

int

Encoding

Gets or sets how the entry was stored, which the writer keeps when it writes a raster at its own size.

public IcoEntryEncoding Encoding { get; set; }

Property Value

IcoEntryEncoding

Entries

Gets or sets the whole directory, every entry that could be read, so the sizes are known without decoding them.

public IReadOnlyList<IcoEntry> Entries { get; set; }

Property Value

IReadOnlyList<IcoEntry>

Hotspot

Gets or sets the cursor's hotspot, or null for an icon.

public Point? Hotspot { get; set; }

Property Value

Point?

Index

Gets or sets the entry's index in the directory.

public int Index { get; set; }

Property Value

int

Methods

Copy()

Returns a deep copy.

public override FormatDetails Copy()

Returns

FormatDetails

The copy.