XImage.Raster
Features
Tech Specs
How-to C#
Pricing

C# Imaging Library
How to C#: Resize Image according to Specified Size


Guide for How to Resize Image







Steps to Resize image



  • Load an image with RasterImage object.
  • Create an image processor with ImageProcess object.
  • Call the method ResizeImage of ImageProcess object to complete the task flopping image.
  • Save the resized image to an image file on the disk.


How to Resize Image



By using the XImage.Raster SDK, you can modify the image size and orientation by assigning it to the processor. Resize the image(in pixel) according to the specified interpolate method(Interpolate method enumeration).

Sample Code (resize current image according to specified size):

RasterImage img = new RasterImage("C://input//raster-arrow-down.png");
ImageProcess processor = new ImageProcess(img);
processor.ReSizeImage(new Size(300, 300), InterpolateMethod.Average16InterpolatePixel);
img.Save("C://output//raster-image-resize.png");


Compare the source image and image resized

Source image Image resized