BitmapExtensions.Resize Method

KGy SOFT Drawing Libraries

BitmapExtensionsResize Method KGy SOFT Drawing Libraries Help
Resizes the image with high quality. The result is always a 32 bit ARGB image.

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

public static Bitmap Resize(
	this Bitmap image,
	Size newSize,
	bool keepAspectRatio
)
<ExtensionAttribute>
Public Shared Function Resize ( 
	image As Bitmap,
	newSize As Size,
	keepAspectRatio As Boolean
) As Bitmap
public:
[ExtensionAttribute]
static Bitmap^ Resize(
	Bitmap^ image, 
	Size newSize, 
	bool keepAspectRatio
)
[<ExtensionAttribute>]
static member Resize : 
        image : Bitmap * 
        newSize : Size * 
        keepAspectRatio : bool -> Bitmap 

Parameters

image
Type: System.DrawingBitmap
The original image to resize
newSize
Type: System.DrawingSize
The requested new size.
keepAspectRatio
Type: SystemBoolean
Determines whether the source image should keep aspect ratio.

Return Value

Type: Bitmap
A Bitmap instance with the new size.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Bitmap. 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).
See Also

Reference