Method ExtMisc.Resize(+ 1 overload)
Overload
Resizes this image.
public static Bitmap Resize(this Bitmap b, int width, int height, BRFilter filter, bool dispose, bool premultiplied = false)
Parameters
| b (Bitmap) |
|
width (int)
New width. |
|
height (int)
New height. If width or height is 0, calculates it (preserves aspect ratio). |
|
filter (BRFilter)
Enum: Lanczos3, CatmullRom, Bicubic. |
|
dispose (bool)
When resized, call |
|
premultiplied (bool)
Let the resized bitmap have |
Returns
|
Bitmap
Resized image (new object). Returns this image if new width and height would be the same as of this image. |
Exceptions
|
ArgumentException
Unsupported |
Overload(top)
Resizes this image.
public static Bitmap Resize(this Bitmap b, double factor, BRFilter filter, bool dispose, bool premultiplied = false)
Parameters
| b (Bitmap) |
|
factor (double)
Scaling factor. For example 2 to make 2 times bigger, or 0.5 to make 2 times smaller. |
|
filter (BRFilter)
Enum: Lanczos3, CatmullRom, Bicubic. |
|
dispose (bool)
When resized, call |
|
premultiplied (bool)
Let the resized bitmap have |
Returns
|
Bitmap
Resized image (new object). Returns this image if new width and height would be the same as of this image. |
Exceptions
|
ArgumentException
Unsupported |