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

C# Image Library
How to C#: Quick to Start Using XImage.Raster


To Have a Quick Evaluation of XImage.Raster in Visual C# Console Application




As a leading professional third-party SDK supplier in the field of image and document management, RasterEdge has always been devoted to providing various effective and fully-functional imaging solutions for developers who are working on different .NET developing applications.






How to read, process, convert raster images using C#?

  1. Download XImage.Raster C# imaging library
  2. Install C# library to process TIFF, BMP, PNG, JPG images in .NET applications
  3. Step by Step Tutorial












Install XImage.Raster

You can quickly download and install XImage.Raster nuget packages in your .NET projects. Go to NuGet Package Manager in your Visual Studio, search and install the following packages:

  • XImage.Raster
  • RasterEdge.Core


For .NET Framework (4.x, 3.x, 2.x) projects, you can view the install details here:
How to install XImage.Raster in .NET projects?




Quick to load, save image in C#

Using XImage.Raster C# image library, you can quickly load an existing image file for further processing in C#.

RasterImage anImage = new RasterImage("raster-sample-image.png");


Or you can also create an empty image from scratch in C# program. The C# source code below will create a new image file with a white background, 300 pixels in width and height.

RasterImage anImage = new RasterImage(300, 300, Color.White);
anImage.Save("raster-image-new-from-scratch.png");




Read, modify image in C#

Using C# imaging library, you can read, explore loaded image detailed information in C# application. Here you will learn how to get the image color space information.

RasterImage image = new RasterImage("raster-sample-image.png");
ColorSpace colorSpace = image.ColorSpace;


You can also easily edit, modfily image information, such as image comments data in C# ASP.NET, WinForms, WPF applications.

Here we try to add a new comment text string to the loaded image in C# code below.

RasterImage img = new RasterImage("raster-sample-image.png");
ImageProcess processor = new ImageProcess(img);
processor.AddComment("RasteEdge.XImage.Raster");




Image comversions

Image format conversions and compression changing are common tasks for an image processor library. Using XImage.Raster C# library, you can quickly and easily apply new image compress, change image formats in the C# applications.

Here we will open, read a tiff image file and convert it to a JPEG file in C#.

RasterImage img = new RasterImage("input.tiff");
img.Save(@"output.jpeg");




Image process

XImage.Raster C# imaging library supports multiple common image process functions, such as Geometric Transformations crop, flip, flop, rotate, resize, Image Enhancement brightness, contrast, sharpening, and Image filtering Gaussian Filtering, Mean Filtering.

Here we will show how to quickly flip an image in C# application.

RasterImage img = new RasterImage("C://input//raster-arrow-down.png");
ImageProcess processor = new ImageProcess(img);
processor.FlipImage();
img.Save("C://output//raster-image-flip.png");




Process multi-page TIFF & GIF image file

You can read and process multiple pages tiff or gif image files in C# application. The following C# example code will instruct how to merge, combine multiple png image files into one tiff file in C#.

MultiPageImageProcess.CombineDocument(
    new RasterImage("C://input//raster-arrow-right.png"),
    new RasterImage("C://input//raster-arrow-down.png"),
    "C://output//raster-merged-arrows.tif");




Draw graph & text on image in C#

Sometimes you want markup text or add graph on an existing image file. XImage.Raster library provides API to quickly add styled text, graphs on one image file using C#.

The C# codes below will add text string "XImage.Raster" on an image file.

RasterImage image = new RasterImage(200, 200, Color.White);
String text = "XImage.Raster";
DrawMethod.DrawText(image, text, 50, 50); 
image.Save("C://output//raster-image-drawing-text-sample.png");





Why Choose XImage.Raster?

RasterEdge XImage.Raster provides a friendly, easy-to-use API for C# developers to read, write, convert, process, markup images for .NET applications.

The ImageProcess class, for example, includes list of methods to process images, such as Geometric Transformations crop, flip, flop, rotate, resize, Image Enhancement brightness, contrast, sharpening, and Image filtering Gaussian Filtering, Mean Filtering.

The imaging library is robust with comprehensive image management functionality, including image reading, image conversion, image filter processing, drawings on image for your C# ASP.NET Core, MVC, Blazor, Windows Forms, WPF web and desktop applications.




Summary

This C#.NET image processing toolkit, RasterEdge XImage.Raster SDK for .NET is one of the most strongly-featured and mature document imaging library toolkits on the market, which is designed to help developers implement Image-related tasks in their C#.NET applications.

Using this C#.NET image document processor control, you can easily and quickly complete image creating and loading, conversion, image annotation and more in any type of a 32-bit or 64-bit .NET application, including ASP.NET web service and Windows Forms for any .NET version (.NET 5+) and .NET Framework from 2.x to 4.x.