C# Imaging Library
C# Raster - Convert Image to Bitmap in C#.NET
Online C# Guide for Converting Image to Bitmap in .NET Application
RasterEdge XImage.Raster provide convert RasterImage object to Bitmap.
Because pixel format can not be supported fully by Bitmap, if the source image is 1bpp, the output bitmap will convert to index8bpp.
How to read, convert raster image to bitmap using C#?
Convert Image to Bitmap
By following steps below, your can convert RasterImage to bitmap.
Sample Code (convert single frame image to bitmap):
RasterImage img = new RasterImage("input.jpeg");
Bitmap outputBitmap = img.ToBitmap();
Sample Code (convert multi-frame image to bitmap):
RasterImage img = new RasterImage("input.tiff");
Bitmap[] outputBitmaps = new Bitmap[img.PageCount];
for (int n = 0; n < img.PageCount; n++)
{
outputBitmaps[n] = img.ToBitmap(n);
}
How to convert image to bitmap (BMP) with options applied in C#?
When you convert images to bitmap image file using XImage.Raster C# Imaging library, you can customize and apply the following bitmap image options
- Compression set the compression for output bmp file