PredefinedColorsQuantizerSystemDefault1BppPalette Method

KGy SOFT Drawing Libraries Help
Gets a PredefinedColorsQuantizer instance that quantizes colors using the system default 1-bit palette. On Windows this palette consists of the black and white colors.
See the Remarks section for details.

Namespace:  KGySoft.Drawing.Imaging
Assembly:  KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 5.1.0
Syntax

public static PredefinedColorsQuantizer SystemDefault1BppPalette(
	Color backColor = null
)

Parameters

backColor (Optional)
Type: System.DrawingColor
Colors with alpha (transparency) will be blended with this color before quantization. The Color.A property of the background color is ignored. This parameter is optional.
Default value: Empty, which has the same RGB values as Black.

Return Value

Type: PredefinedColorsQuantizer
A PredefinedColorsQuantizer instance that quantizes colors using the system default 1-bit palette.
Remarks

The returned PredefinedColorsQuantizer instance can return up to 2 colors. The system 1-bit palette expected to have the black and white colors on most operating systems.

Tip Tip
To make sure that you use a black and white palette use the BlackAndWhite method instead, which provides white threshold adjustment as well.
For more details and examples see the Examples section of the BlackAndWhite method.

This quantizer fits well for Bitmaps with Format1bppIndexed pixel format.

Note Note
For more information about the possible usable PixelFormats on different platforms see the Remarks section of the ConvertPixelFormat extension method.
See Also

Reference