This method retrieves the number of 0 pixels and 1 pixels from a 1 bit color image.
[Visual Basic]   [ Boolean = ]imagekitcontrolname.GetOneBitPalCountVariant(Pal0 As Variant, Pal1 As Variant, ImageHandle As LONG_PTR)
[VB.NET]   [ Boolean = ]imagekitcontrolname.GetOneBitPalCountVariant(ByRef Pal0 As Object, ByRef Pal1 As Object, ImageHandle As Object))
[C#.NET]   [ bool = ]imagekitcontrolname.GetOneBitPalCountVariant(ref object Pal0, ref object Pal1, object 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 GetOneBitPalCountVariant 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. This method is used in place of the GetOneBitPalCount method when the programming language requires a variant type.


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 is omitted
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 that do not require the variant type, please refer to the GetOneBitPalCount method.

Example:

VB.NET
     Dim Pal0 As Object = Nothing
     Dim Pal1 As Oject = Nothing
     Dim ret As Boolean = ImageKit1.GetOneBitPalCountVariant(Pal0, Pal1)

C#
     object Pal0, Pal1;
     Pal0 = Pal1 = null;
     bool ret = ImageKit1.GetOneBitPalCountVariant(ref Pal0, ref Pal1);

 

The ImageKit10 ActiveX is a product created by Newtone Corporation