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

C# Raster - Convert Image to PNG in C#.NET


Online C# Guide for Converting Image to PNG in .NET Application



Related .net document control helps:
asp.net document viewer in c#: EdgeDoc ASP.NET Document Viewer C# Control: Open, view, annotate, redact, convert documents online using ASP.NET Web Con...
c# asp.net document annotation: ASP.NET Document Annotation Control: text comment, drawing on files online using ASP.NET component
asp.net open pdf password using c#: ASP.NET PDF Password Edit Control: online add, remove, update PDF file open password using C#
c# asp.net pdf document viewer: ASP.NET PDF Document Viewer in C#: view, annotate, redact Adobe PDF files online in ASP.NET
c# asp.net image viewer: ASP.NET Image Document Viewer Control: view, annotate, redact, convert image files in html web browser
c# asp.net sharepoint document viewer: ASP.NET SharePoint Document Viewer: view, annotate, redact documents in SharePoint
asp.net doc document viewer: ASP.NET Office Word Document Viewer: view MS Office Word files online using C# in ASP.NET web applications


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.




Convert RasterImage to PNG



Sample Code (convert single frame image to PNG):




ConvertHandler.Convert("input.jpeg", @"output.png");




Sample Code (convert multi-frame image to JPEG):




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