public static Icon ToIcon(
this Image image
)<ExtensionAttribute>
Public Shared Function ToIcon (
image As Image
) As Iconpublic:
[ExtensionAttribute]
static Icon^ ToIcon(
Image^ image
)[<ExtensionAttribute>]
static member ToIcon :
image : Image -> Icon The result icon will have the same size as the specified image. To force creating a squared icon, use the ToIcon(Image, Int32, Boolean) overload instead.
If the raw format of image is an icon that contains multiple images, then the result will also contain multiple resolutions.
To disable PNG compression also for large images regardless of the current operating system use the Combine(Bitmap, Color, Boolean) method instead.
This overload attempts to reduce the color depth of the image losslessly if possible. To prevent that, use the ToIcon(Image, Color) overload instead.
The result Icon is compatible with Windows XP if the method is executed in a Windows XP environment.