Click or drag to resize
Accord.NET (logo)

ImageConvert8bppTo16bpp Method

Convert bitmap with 8 bits per plane to a bitmap with 16 bits per plane.

Namespace:  Accord.Imaging
Assembly:  Accord.Imaging (in Accord.Imaging.dll) Version: 3.8.0
public static Bitmap Convert8bppTo16bpp(
	this Bitmap bitmap
Request Example View Source


Type: System.DrawingBitmap
Source image to convert.

Return Value

Type: Bitmap
Returns new image which is a copy of the source image but with 16 bits per plane.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Bitmap. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
UnsupportedImageFormatExceptionInvalid pixel format of the source image.

The routine does the next pixel format conversions:

  • Format8bppIndexed (grayscale palette assumed) to Format16bppGrayScale;
  • Format24bppRgb to Format48bppRgb;
  • Format32bppArgb to Format64bppArgb;
  • Format32bppPArgb to Format64bppPArgb.

See Also