<PackageReference Include="System.Drawing.Common" Version="8.0.0-preview.5.23280.5" />

Icon

Represents a Windows icon, which is a small bitmap image that is used to represent an object. Icons can be thought of as transparent bitmaps, although their size is determined by the system.
public IntPtr Handle { get; }

Gets the Windows handle for this Icon. This is not a copy of the handle; do not free it.

public int Height { get; }

Gets the height of this Icon.

public Size Size { get; }

Gets the size of this Icon.

public int Width { get; }

Gets the width of this Icon.

public Icon(Icon original, Size size)

Initializes a new instance of the Icon class and attempts to find a version of the icon that matches the requested size.

public Icon(Icon original, int width, int height)

Initializes a new instance of the Icon class and attempts to find a version of the icon that matches the requested size.

public Icon(Stream stream)

Initializes a new instance of the Icon class from the specified data stream.

public Icon(Stream stream, Size size)

Initializes a new instance of the Icon class of the specified size from the specified stream.

public Icon(Stream stream, int width, int height)

Initializes a new instance of the Icon class from the specified data stream and with the specified width and height.

public Icon(string fileName)

Initializes a new instance of the Icon class from the specified file name.

public Icon(string fileName, Size size)

Initializes a new instance of the Icon class of the specified size from the specified file.

public Icon(string fileName, int width, int height)

Initializes a new instance of the Icon class with the specified width and height from the specified file.

public Icon(Type type, string resource)

Initializes a new instance of the Icon class from a resource in the specified assembly.

public static Icon ExtractAssociatedIcon(string filePath)

Returns an icon representation of an image that is contained in the specified file.

public static Icon FromHandle(IntPtr handle)

Creates a GDI+ Icon from the specified Windows handle to an icon (HICON).

public object Clone()

Clones the Icon, creating a duplicate image.

public void Dispose()

Releases all resources used by this Icon.

public void Save(Stream outputStream)

Saves this Icon to the specified output Stream.

public Bitmap ToBitmap()

Converts this Icon to a GDI+ Bitmap.