BitmapExtensionsResize(Bitmap, Size, Boolean) Method
Namespace: KGySoft.DrawingAssembly: KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 7.2.0
public static Bitmap Resize(
this Bitmap image,
Size newSize,
bool keepAspectRatio = false
)
<ExtensionAttribute>
Public Shared Function Resize (
image As Bitmap,
newSize As Size,
Optional keepAspectRatio As Boolean = false
) As Bitmap
public:
[ExtensionAttribute]
static Bitmap^ Resize(
Bitmap^ image,
Size newSize,
bool keepAspectRatio = false
)
[<ExtensionAttribute>]
static member Resize :
image : Bitmap *
newSize : Size *
?keepAspectRatio : bool
(* Defaults:
let _keepAspectRatio = defaultArg keepAspectRatio false
*)
-> Bitmap
- image Bitmap
- The original image to resize
- newSize Size
- The requested new size.
- keepAspectRatio Boolean (Optional)
- to keep aspect ratio of the source image; otherwise, . This parameter is optional.
Default value: .
BitmapA
Bitmap instance with the new size.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).