IconExtensionsToMultiResBitmap Method (Icon)

KGy SOFT Drawing Libraries Help
Converts the icon to a Bitmap instance, which contains every image of the icon. When the returned Bitmap is used to create another Bitmap or is drawn into a Graphics, the best-fitting image is automatically applied.

Namespace:  KGySoft.Drawing
Assembly:  KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 5.3.0
Syntax

public static Bitmap ToMultiResBitmap(
	this Icon icon
)

Parameters

icon
Type: System.DrawingIcon
The icon to convert to a multi-resolution Bitmap.

Return Value

Type: Bitmap
A Bitmap instance, which contains every image of the icon.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Icon. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks

Note Note
On some platforms this method may throw a PlatformNotSupportedException if icon contains only a very large icon.
See Also

Reference