How to C#: Imaging
Using Imaging SDK for C#.NET
Winforms Controls
Image Load
Image Access and Modify
Geometry: Resize
Geometry: Resize
  |  
Home ›› XImage.Raster ›› C# Raster: Resize Image according to Specified Size

How to C#: Resize Image according to Specified Size


Guide for How to Resize Image



Related .net document control helps:
asp.net pdf document viewer: ASP.NET PDF Document Viewer in C#: open, display, view, annotate, redact Adobe PDF files online in ASP.NET MVC & WebForm...
asp.net edit pdf text: ASP.NET PDF Text Edit Control: online edit PDF text content using C# ASP.NET
asp.net pdf viewer: ASP.NET PDF Viewer Control: view, navigate, zoom Adobe PDF document in C# ASP.NET
asp.net edit pdf image: ASP.NET PDF Image Edit Control: online insert, edit PDF images in C#
asp.net mvc pdf editor: ASP.NET MVC PDF Viewer & Editor: view, annotate, redact, edit PDF document in C# ASP.NET MVC
asp.net dicom document viewer: ASP.NET Dicom Document Viewer Control: view, annotate dicom imaging files online in ASP.NET
asp.net mvc document viewer: ASP.NET MVC Document Viewer: view, annotate, redact files on ASP.NET MVC web projects


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.


In order to acheive the work, please refer to the following steps. itextsharp add image to existing pdf vb.net, vb.net code to extract text from pdf, how to convert pdf to image using itextsharp in c#, free pdf viewer c#, display pdf in mvc, asp.net pdf writer.




Install XImage.Raster in C# Project



Add necessary references to your C#.NET project. Right-click the project and select "Add Reference..." to locate and add the following DLLs as project references; open source library to print pdf c#, remove pdf password c#, convert image to pdf vb.net, c# pdf highlight text, vb.net pdf viewer, c# imagemagick convert pdf to png, convert pdf to html vb.net.


  RasterEdge.Imaging.Basic.dll


  RasterEdge.XImage.Raster.Core.dll


  RasterEdge.XImage.Raster.dll


Use corresponding namespaces;


  using RasterEdge.XImage.Raster;


Note: When you get the error "Could not load file or assembly 'RasterEdge.Imaging.Basic' or any other assembly or one of its dependencies. An attempt to load a program with an incorrect format", please check your configure as follows:

       

       If you are using x64 libraries/dlls, Right click the project -> Properties -> Build -> Platform target: x64.

       

       If using x86, the platform target should be x86.




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). preview pdf in asp.net mvc, free asp.net tiff viewer, asp.net add text to pdf field, asp net core mvc pdf viewer download, pdf editor asp.net, asp.net pdf viewer c#, how to add header and footer in pdf using itextsharp in asp.net.


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




RasterImage img = new RasterImage(@"C:\input.tif");
ImageProcess process = new ImageProcess(img);
//Resize all the pages, the target size is 100x100.
process.ReSizeImage(new Size(100, 100), InterpolateMethod.BicubicInterpolatePixel);
//Only resize the second page of the input tif.
process.ReSizeImage(new Size(100, 100), InterpolateMethod.BicubicInterpolatePixel, 1);
img.Save(@"C:\output.tif");