Resizes an image, maintaining width:height ratios.
Namespace: System.Extensions.DrawingAssembly: System.Extensions (in System.Extensions.dll) Version: 0.0.0.5 (0.0.0.5)
Syntax
C# |
---|
public static Image Resize(
this Image image,
int width,
int height,
bool pad
) |
Visual Basic |
---|
<ExtensionAttribute>
Public Shared Function Resize (
image As Image,
width As Integer,
height As Integer,
pad As Boolean
) As Image |
Visual C++ |
---|
public:
[ExtensionAttribute]
static Image^ Resize(
Image^ image,
int width,
int height,
bool pad
) |
F# |
---|
static member Resize :
image : Image *
width : int *
height : int *
pad : bool -> Image
|
Return Value
Type:
ImageThe resulting resized
Image object.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Image. 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