public static Icon Resize(
this Icon icon,
Size size
)<ExtensionAttribute>
Public Shared Function Resize (
icon As Icon,
size As Size
) As Iconpublic:
[ExtensionAttribute]
static Icon^ Resize(
Icon^ icon,
Size size
)[<ExtensionAttribute>]
static member Resize :
icon : Icon *
size : Size -> Icon If the icon contains images with the specified size, then this method just extracts the highest bit-per-pixel image of the requested size.
If the icon does not contain an image exactly with the specified size, then this method takes a close image in size and resizes that to the requested size. If resizing happens, the result will always contain a 32 bpp image.
If an actual resize is needed, this overload uses Graphics.DrawImage internally, which provides a good quality result but on Windows blocks every parallel DrawImage call within the same process. If that might be an issue use the Resize(Icon, Size, ScalingMode) overload instead.