How to C#: Imaging
Using Imaging SDK for C#.NET
Winforms Controls
Image Load
Image Access and Modify
Quick to Start
Home ›› XImage.Raster ›› C# Raster: Quick to Start

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. c# pdf reader free, pdf text extract, how to create a thumbnail image of a pdf in c#, c# read tiff compression, barcode scanner using c#, c# bitmap tiff.

Related .net document control helps:
c# word document viewer: ASP.NET Office Word Document Viewer: view Word doc files online using C# in ASP.NET MVC web applications
c# mvc document viewer: ASP.NET Document Viewer using C#: Open, View, Annotate, Redact, Convert document files in ASP.NET using C#, HTML5, JQuer...
c# image viewer: ASP.NET Image Viewer Control(MVC & WebForms): view, annotate, redact, convert image files in html, JQuery edit pdf page using c#: ASP.NET PDF Pages Edit Control: add, remove, sort, replace PDF pages online using C# edit pdf text using c#: ASP.NET PDF Text Edit Control: online edit PDF text content using C# ASP.NET
c# dicom viewer: ASP.NET Dicom Document Viewer Control: view, annotate dicom imaging files online in ASP.NET pdf document viewer c#: ASP.NET PDF Document Viewer in C#: open, display, view, annotate, redact Adobe PDF files online in ASP.NET MVC & WebForm...

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. pdf to image c# free, convert pdf page to bitmap c#, merge pdf files in c#, docx to pdf c#, print pdf to default printer, pdf page count, pdf to png.

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 Framework version from 2.0 to 4.5. pdf viewer control open source, mvc pdf editor, open excel file on client, tif viewer, view image from database, free pdf preview in asp net c#, mvc show pdf in div.

As you know, there're various reliable image processing features that can be implemented in C#.NET programming. And you may want to have a quick testing on RasterEdge XImage.Raster after downloading its free trial package online.  To meet your requirement, on this quick to start page, we will tell how to create a C# console application, and C# WinForms application load , and save a new image file.

Create a C# Console Application

Open Visual Studio and click "New" from toolbar. Note, Visual Studio 2005 and above versions are available ;

Choose "C# Language" and "Console Application" respectively to create a project.

Sample C# Code for Convert Bmp Format to Png Format and Save

By following steps below, your C# project will convert input bmp image file to png file according to priority, and then create a new png file to a defined output path.

Add necessary XImage.Raster DLL libraries into your created C# application as references.




Use namespace "RasterEdge.Imaging.Basic";

Use namespace "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.

Copy of the following C# sample code to your application.

String inputFilePath = Program.RootPath + "\\"  +  "input.bmp";
String outputFilePath = Program.RootPath + "\\"  +  "output.png";
RasterImage img = new RasterImage(inputFilePath);
//Convert format and save.

Sample C# Code for Create WinFroms Application Fast

By following steps below, your C# WinForms project view image.

Open or create a new WinForms application, add “RasterEdge.XImage.Raster.WinFormsControl.dll”to the project’s reference.

Add a new Form Item to the project, and choose to design mode sign. Make the ToolBox view show.

Right click the ToolBox panel, and select “Choose Items…”, in the .NET Framework Components tab of pop-up dialog, click “Browse…”button to navigate the “RasterEdge.XImage.Raster.WinFormsControl.dll”, and make sure the “ImageView”and “ThumbnailView”is checked.

Now the RasterEdge image view control appears in the ToolBox. Just drag and drop the “ImageView”and “ThumbnailView”items to your new Form control.

To make the ThumbnailView connect to the ImageView, add the following code to the Form Initialize method.

public Form1()
     this.thumbnailView1.ThumbImageIndexChanged += new RasterEdge.XImage.Raster.WinFormsControl.ThumbImageIndexChangedEventHandler(thumbnailView1_ThumbImageIndexChanged);
void  thumbnailView1_ThumbImageIndexChanged(object sender,  RasterEdge.XImage.Raster.WinFormsControl.ThumbImageIndexChangedEventArgs e)
     ThumbnailItem item = e.ThumbItem;
     this.imageView1.ShowImage(item, false);