How to C#: Imaging
Using Imaging SDK for C#.NET
Winforms Controls
Image Load
Image Access and Modify
Choose image region to process
Choose image region to process
  |  
Home ›› XImage.Raster ›› C# Raster: Choose image region to process

How to C#: Choose Image Region to Process


Overview for How to Choose Image Region to Process




Overview



Prior to performing image processing on an image, you must specify whether the entire image, or a section of the image, should be processed. c# itext7 replace text in pdf, how to open pdf file in vb.net form, how to print a pdf in asp.net using c#, convert word to pdf in c# code, c# split pdf into images, c# code 39 barcode generator. The Processor class provides two vehicles for specifying a section of the image to be processed.


Related .net document control helps:
c# asp.net mvc document viewer: ASP.NET Document Viewer using C#: Open, View, Annotate, Redact, Convert document files in ASP.NET using C#, HTML5, JQuer...
asp.net pdf editor component: EdgePDF: ASP.NET PDF Editor Web Control: Online view, annotate, redact, edit, process, convert PDF documents
asp.net mvc image viewer: ASP.NET Image Viewer Control(MVC & WebForms): view, annotate, redact, convert image files in html, JQuery
asp.net pdf viewer control free: ASP.NET PDF Viewer Control: view, navigate, zoom Adobe PDF document in C# ASP.NET
asp.net view powerpoint: ASP.NET PowerPoint Document Viewer Control (MVC & WebForms): view ppt, pptx files online in C# using ASP.NET
asp.net dicom library: ASP.NET Dicom Document Viewer Control: view, annotate dicom imaging files online in ASP.NET
asp.net edit pdf text control: ASP.NET PDF Text Edit Control: online edit PDF text content using C# ASP.NET




Steps to Select an image region or area to Process



Load an image with RasterImage object.


Create an image processor with ImageProcess object.


Set the region will be processed.


According to your needs, you can call the following method in ImageProcess.cs to process the select image region freely.


  public void WaveImage(double amplitude, double wave length)


  public void VignetteImage(double radius, double sigma, int x, int y)


  public void TrimImage()


  public void TransformResolution(int horiResolution, int vertResolution)


If you want to know more APIs to process images, please refer to the class ImageProcess. pdf to jpg vb.net, c# extract text from pdf, itextsharp how to create pdf with a table design and embed image in c#, c# pdfsharp merge pdf sample, how to convert pdf to jpg in c# windows application, c# pdf highlight text, vb.net change pdf metadata.




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;


  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. asp.net pdf viewer user control, asp.net open excel file on client, how to add header and footer in pdf using itextsharp in asp.net, asp.net tiff viewer control, how to edit pdf file in asp.net c#, mvc display pdf in browser, pdf preview in asp.net c#.




Select an area or region to Process



You can specify whether process the entire image or just a section of the image.


Sample Code (process the whole image):




RasterImage img = new RasterImage(@input.jpeg);
//process the whole image. 
ImageProcess processor = new ImageProcess(img);
processor.WaveImage(10,10);
erImage img = new RasterImage(inputFilePath); 
//Convert format and save. 
img.Save(outputFilePath);




Sample Code (process the image of the specified region):




RasterImage img = new RasterImage(@input.jpeg);
ImageProcess processor = new ImageProcess(img);
//set the area(0,0,100,100) to process
processor.SetArea = new Rectangle(0, 0, 100, 100);
processor.WaveImage(10,10);
//when the specified process is end , must set this flag to true.
processor.AreaProcessEnd = true;