NAME

colors - Count the Colors in an Image


SYNOPSIS

status=IsPseudoClass(image)

NumberColors(image,file)


FUNCTION DESCRIPTIONS

A description of each parameter follows.

node_info:

The address of a structure of type NodeInfo which points to a node in the color cube tree that is to be pruned.

A description of each parameter follows.

color_cube:

A pointer to the CubeInfo structure.

level:

Specifies the level in the classification the node resides.


IsPseudoClass

Method IsPseudoClass returns True if the image is PseudoClass and has 256 unique colors or less. If the image is DirectClass and has less 256 colors or less, the image is demoted to PseudoClass.

The format of the IsPseudoClass routine is:

        status=IsPseudoClass(image)

A description of each parameter follows.

status:

Method IsPseudoClass returns True is the image is PseudoClass or has 256 color or less.

image:

The address of a byte (8 bits) array of run-length encoded pixel data of your source image. The sum of the run-length counts in the source image must be equal to or exceed the number of pixels.


NumberColors

Method NumberColors returns the number of unique colors in an image.

The format of the NumberColors routine is:

        NumberColors(image,file)

A description of each parameter follows.

image:

The address of a byte (8 bits) array of run-length encoded pixel data of your source image. The sum of the run-length counts in the source image must be equal to or exceed the number of pixels.

file:

An pointer to a FILE. If it is non-null a list of unique pixel field values and the number of times each occurs in the image is written to the file.