Accusoft ImagXpress 13
ColorCount Method
Stores four, 8-bit components: alpha, red, green, and blue, respectively.

 

Note: The specified Color must be in a valid OLE_COLOR range.

Description
Returns the number of pixels of a specified color within the current image area.
Syntax
Visual Basic
Public Function ColorCount( _
   ByVal Color As OLE_COLOR _
) As Long
Parameters
Color
Stores four, 8-bit components: alpha, red, green, and blue, respectively.

 

Note: The specified Color must be in a valid OLE_COLOR range.

Return Type
The number of pixels of the specified color within the current image or area of the image.
Remarks

This method can be used to determine if a check box on a document image is filled or if a specific field on a form is filled. Use the Area and Region methods to process a portion of the image.

Example
Function that returns the number of black pixels in an image.
Private Function CountBlack() As Long
    CountBlack = ImagXpress1.ColorCount(rgb(0, 0, 0))
End Function
See Also

ImagXpress Object  | ImagXpress Members  | UniqueColors Method  | RGBColorCountV Method  | Color Image Processing  | Image Processing  | Image Information

 

 


©2019. Accusoft Corporation. All Rights Reserved.

Send Feedback