PercentBlackPixels

The action evaluates the image for the current object and determines the percentage of black pixels.

Parameters

Percentage: It denotes the percentage of black pixels. The parameter must be a numerical value that indicates the percentage to be tested. Either a minimum percentage or a maximum percentage.

MinMax: Indicates if the percentage should be evaluated as a minimum or maximum. A value of "Min" or "Minimum" indicates the percentage is a minimum value. A value of "Max" or "Maximum" indicates the percentage is a maximum value.

Smart parameters are supported for all parameters.

Returns

If the percentage is expected to be a minimum, then the action returns True, if the percentage of black is greater than the provided percentage value. If the percentage is expected to be a maximum, then the action returns True, if the actual percentage is less than the maximum percentage provided. If an error is encountered, the action returns False.

Level

Page or field.

Details

The action evaluates the image for the current object and determines the percentage of black pixels. If the current object is a page, then the entire page image is evaluated. If the current object is a field, then the area defined for the field is evaluated. If the object is a field, then the field's zone coordinates must be loaded. The action evaluates the percentage and compares it to the provided percentage parameter. If the percentage is expected to be a minimum, then the action returns true, if the percentage of black is greater than the provided percentage value. If the percentage is expected to be a maximum, then the action returns true if the actual percentage is less than the maximum percentage provided. The action creates the DCO variable "NumberBlackPixels" with the value of the number of black pixels in the image.

The action creates the DCO variable "PercentPixels" indicating the actual percentage of black pixels in the area. It is required that the associated page image must be a 1 bit image.

Example 1 :
PercentBlackPixels("4.54", "Min")

This action returns true if the percentage of black pixels is greater than or equal to 4.54%.

Example 2 :
PercentBlackPixels("4.54", "Max")

This action returns true if the percentage of black pixels is less than or equal to 4.54%.