Accusoft ImagXpress 12
ColorCount Method
See Also  Example  Send comments on this topic.
Color
Stores four, 8-bit components: alpha, red, green, and blue, respectively.

 

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

AccusoftImagXpress12 ActiveX DLL > ImagXpress Object : ColorCount Method

Glossary Item Box

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.
Using ColorCount. (Visual Basic)Copy Code
Private Function CountBlack() As Long
    CountBlack = ImagXpress1.ColorCount(rgb(0, 0, 0))
End Function

See Also

©2013. Accusoft Corporation. All Rights Reserved.