How to C#: Imaging
Using Imaging SDK for C#.NET
WinFroms Controls
Image Access and Modify
Save Image to Byte Array
Home ›› XImage.Raster ›› C# Raster: Save Image(s) to Byte Array

How to C#: Save Image(s) to byte array

Overview for How to save image(s) to byte array

Related .net document control helps: sharepoint document viewer free: ASP.NET SharePoint Document Viewer: view, annotate, redact documents in SharePoint display tiff images: ASP.NET Tiff Viewer: view, annotate multipage Tiff images in ASP.NET MVC, WebForms using C# Control edit pdf page: ASP.NET PDF Pages Edit Control: add, remove, sort, replace PDF pages online using C# pdf document viewer: ASP.NET PDF Document Viewer in C#: open, display, view, annotate, redact Adobe PDF files online in ASP.NET MVC & WebForm... image viewer jquery: ASP.NET Image Viewer Control(MVC & WebForms): view, annotate, redact, convert image files in html, JQuery document viewer free: EdgeDoc:ASP.NET Document Viewer C# Control: Open, view, annotate, redact, convert documents online in C#, VB.NET, AS... edit pdf text color: ASP.NET PDF Text Edit Control: online edit PDF text content using C# ASP.NET

Sample C# Code for Convert RasterImage to GIF



By following steps below, your can convert RasterImage to GIF.


Sample Code 1:

Save the RasterImage object to byte array according to the specified format.

RasterImage img = new  RasterImage(@"input.jpeg");
Byte[] result = img.SaveToBytes(ImageFormat.PNG);

Sample Code2:

Save the RasterImage object to bye array according to the save options.

RasterImage img = new  RasterImage(@"input.jpeg");
SaveOption option = new SaveOption();
option.ImageFormat = ImageFormat.PNG;
option.Png.Filter = PNGFilter.PAETH;
byte[] result = img.SaveToBytes(option);