Click or drag to resize
Accord.NET (logo)

ImageConvert16bppTo8bpp Method

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

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

Parameters

bitmap
Type: System.DrawingBitmap
Source image to convert.

Return Value

Type: Bitmap
Returns new image which is a copy of the source image but with 8 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).
Exceptions
ExceptionCondition
UnsupportedImageFormatExceptionInvalid pixel format of the source image.
Remarks

The routine does the next pixel format conversions:

  • Format16bppGrayScale to Format8bppIndexed with grayscale palette;
  • Format48bppRgb to Format24bppRgb;
  • Format64bppArgb to Format32bppArgb;
  • Format64bppPArgb to Format32bppPArgb.

See Also