Convert bitmap with 16 bits per plane to a bitmap with 8 bits per plane.
Namespace:
AForge.ImagingAssembly: AForge.Imaging (in AForge.Imaging.dll) Version: 2.2.5.0 (2.2.5.0)
Syntax
Parameters
- bimap
- Type: System.Drawing..::.Bitmap
Source image to convert.
Return Value
Returns new image which is a copy of the source image but with 8 bits per plane.
Remarks
The routine does the next pixel format conversions:
- Format16bppGrayScale to Format8bppIndexed with grayscale palette;
- Format48bppRgb to Format24bppRgb;
- Format64bppArgb to Format32bppArgb;
- Format64bppPArgb to Format32bppPArgb.
Exceptions
| Exception | Condition |
|---|---|
| AForge.Imaging..::.UnsupportedImageFormatException | Invalid pixel format of the source image. |