How to C#: Crop Image according to Specified Size
Guide for How to Crop Image
c# code to compress pdf,
how to add header and footer in pdf using itextsharp in c# with example,
vb.net pdf generator,
vb.net itextsharp add image to pdf,
c# pdf reader writer,
qr code reader using webcam c#.
Related .net document control helps:
asp.net display tiff images: ASP.NET Tiff Viewer: view, annotate multipage Tiff images in ASP.NET MVC, WebForms using C# Control
asp.net mvc pdf editor control: ASP.NET MVC PDF Viewer & Editor: view, annotate, redact, edit PDF document in C# ASP.NET MVC
asp.net image viewer jquery: ASP.NET Image Viewer Control(MVC & WebForms): view, annotate, redact, convert image files in html, JQuery
asp.net office document viewer: ASP.NET Office Word Document Viewer: view Word doc files online using C# in ASP.NET MVC web applications
asp.net pdf editor component: EdgePDF: ASP.NET PDF Editor Web Control: Online view, annotate, redact, edit, process, convert PDF documents
asp.net view text file: ASP.NET Text file viewer in MVC, WebForms: Open, view, annotate, convert txt files in C# ASP.NET
asp.net dicom web viewer: ASP.NET Dicom Document Viewer Control: view, annotate dicom imaging files online in ASP.NET
Steps to Crop image with specific Region
Load an image with RasterImage object.
Create an image processor with ImageProcess object.
Call the method CropImage of ImageProcess object to complete the task croping image.
Save the croped image to an image file on the disk.
If you want to have a try, please refer to the following steps.
c# convert pdf to text file,
c# pdf printing library,
how to rotate a pdf in c#,
vb.net password protect pdf file,
c# pdfsharp fill pdf form,
vb.net convert pdf to text file,
byte array to pdf in c#.
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.
free pdf preview in asp net c#,
asp net replace text fro pdf free,
asp.net tiff image viewer,
asp.net mvc pdf viewer control,
asp.net display pdf,
how to edit pdf file in asp.net c#,
asp.net display excel spreadsheet.
Crop Image Size
By using the XImage.Raster SDK, you can crop the current image to the specified valid size.
Sample Code (crop current image to specified size):
RasterImage img = new RasterImage(@"C:\input.tif");
ImageProcess process = new ImageProcess(img);
//Crop the image to the specified size, X coordinate is 10, Y coordinate is 20, and the target size is 200x200.
process.CropImage(new Rectangle(10, 20, 200, 200));
//If the tiff image has multiple pages,
//it will only crop the second page of the input tif
process.CropImage(new Rectangle(10, 20, 200, 200), 1);
img.Save(@"C:\croped.tif");
|