Creates a resized bitmap from an existing image on disk. Resizes the image by creating an aspect ratio safe image. Image is sized to the larger size of width height and then smaller size is adjusted by aspect ratio.
Image is returned as Bitmap - call Dispose() on the returned Bitmap object
public static Bitmap ResizeImage(string filename, int width, int height, InterpolationMode mode)
Return Value
Bitmap or null
Parameters
filename
width
height
mode
Overloads:
public static Bitmap ResizeImage(Byte[] data, int width, int height, InterpolationMode mode)
public static bool ResizeImage(string filename, string outputFilename, int width, int height, InterpolationMode mode, int jpegCompressionMode)
public static Bitmap ResizeImage(Bitmap bmp, int width, int height, InterpolationMode mode)
See also:
Class ImageUtils© West Wind Technologies, 1996-2016 • Updated: 12/12/15
Comment or report problem with topic