This method retrieves the number of 0 pixels and 1 pixels from a 1 bit color image.
[Visual Basic]   [ Boolean = ]imagekitcontrolname.GetOneBitPalCount(Pal0 As Long, Pal1 As Long, ImageHandle As LONG_PTR)
[Visual C++]     [ BOOL = ]imagekitcontrolname.GetOneBitPalCount(long *Pal0, long *Pal1, LONG_PTR ImageHandle)
[VB.NET]   [ Boolean = ]imagekitcontrolname.GetOneBitPalCount(ByRef Pal0 As Integer, ByRef Pal1 As Integer, ImageHandle As Integer(x86) or Long(x64))
[C#.NET]   [ bool = ]imagekitcontrolname.GetOneBitPalCount(ref int Pal0, ref int Pal1, int(x86) or long(x64) ImageHandle)

(x86) refers to the 32 bit version, (x64) refers to the 64 bit version.

Parameters

Name Explanation
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.
ImageHandle The image handle of the raster image

Return Value

Returns True (nonzero) if successful, otherwise returns False (0).

Explanation

The GetOneBitPalCount method retrieves the number of 0 pixels and 1 pixels from a 1 bit color image. This method is enabled for 1 bit color images only.

When the ImageHandle parameter contains a valid image handle
The image data that the ImageHandle parameter refers to will be processed.

When the ImageHandle parameter contains 0
The image data determined by the LayerNo property will be processed. If the LayerNo property is -1 (the base image) then the image data referred to by the ImageHandle property will be processed. If the value of the LayerNo property is between 0 and 99 then the image data referred to by the Layer(LayerNo).ImageHandle property will be processed.

For Palette color, please refer to the GetPalette method.

 

For programs in ASP or other scripting languages that require variant types, please refer to the GetOneBitPalCountVariant method.

Differences from ImageKit7/8

  The ImageHandle argument has a different type.

 

The ImageKit10 ActiveX is a product created by Newtone Corporation