public static Icon ToIcon(
this Image image,
int size,
bool keepAspectRatio
)<ExtensionAttribute>
Public Shared Function ToIcon (
image As Image,
size As Integer,
keepAspectRatio As Boolean
) As Iconpublic:
[ExtensionAttribute]
static Icon^ ToIcon(
Image^ image,
int size,
bool keepAspectRatio
)[<ExtensionAttribute>]
static member ToIcon :
image : Image *
size : int *
keepAspectRatio : bool -> Icon The result icon will be always square sized and will contain only a single image. To create a possibly non-squared icon, use the ToIcon(Image) overload instead.
If image is not resized, this method attempts to preserve the original pixel format. If the image is resized, the result icon will always contain a 32-bit image.