This function retrieves the number of 0 pixels and 1 pixels from a 1 bit color image palette.
[C++Builder] BOOL
IKGetOneBitPalCount(HANDLE Handle, long *Pal0, long *Pal1);
[Delphi] function
IKGetOneBitPalCount(Handle: THandle; var Pal0, Pal1: Longint):
LongBool;
Parameters
Name | Explanation |
---|---|
Handle | The raster image handle |
Pal0 | The number of 0 pixels retrieved from a 1 bit color image palette |
Pal1 | The number of 1 pixels retrieved from a 1 bit color image palette |
Return Value
Returns True if successful, otherwise returns False
Explanation
The IKGetOneBitPalCount function retrieves the number of 0 pixels and 1 pixels from a 1 bit color image palette. In other words, this function tells you how many pixels are black and how many are white in a black and white image. The image data referred to by the Handle parameter must be 1 bit color. If successful, the number of pixels is set into the Pal0 and Pal1 parameters. To retrieve palette color information, please refer to the IKGetPalette function.