BmpEncodeOptions
The settings of a BMP encode (#184), for ImageKodec.encodeBmp. The defaults give the bytes the call without options gives.
Throws
if bitsPerPixel is not one of 1, 4, 8, 16, 24 and 32, or rle is asked for at a depth other than 4 or 8
Properties
the depth of each pixel: null picks 24 for an opaque bitmap and 32 for one with alpha, as the call without options does. 1, 4 and 8 write a palette of the bitmap's colours in the order they first appear, and need an opaque bitmap of at most 2, 16 or 256 colours. 16 writes 5 bits each of red, green and blue (BI_RGB), each rounded to the nearest of its 32 levels, so it is lossy for most bitmaps. 24 is BI_RGB and needs an opaque bitmap. 32 is BI_BITFIELDS under a BITMAPV4HEADER with an alpha mask. Every depth but 16 is lossless.