colors - Methods to Count the Colors in an Image
void CompressColormap( Image *image );
number_colors= GetNumberColors( image, file );
unsigned int IsGrayImage( Image *image );
status= IsMonochromeImage( image );
unsigned int IsOpaqueImage( Image *image );
unsigned int IsPseudoClass( Image *image );
filelist= ListColors( pattern, number_colors );
unsigned int QueryColorDatabase( const char *target, PixelPacket *color );
unsigned int QueryColorName( const PixelPacket *color, char *name );
Method CompressColormap compresses an image colormap removing any duplicate and unused color entries.
The format of the CompressColormap method is:
void CompressColormap ( Image *image );
A description of each parameter follows:
Method GetNumberColors returns the number of unique colors in an image.
The format of the GetNumberColors method is:
number_colors=GetNumberColors ( image, file );
A description of each parameter follows.
Method IsGrayImage returns True if the image is grayscale otherwise False is returned. If the image is DirectClass and grayscale, it is demoted to PseudoClass.
The format of the IsGrayImage method is:
unsigned int IsGrayImage ( Image *image );
A description of each parameter follows:
Method IsMonochromeImage returns True if the image is monochrome otherwise False is returned. If the image is DirectClass and grayscale (including monochrome), it is demoted to PseudoClass.
The format of the IsMonochromeImage method is:
status=IsMonochromeImage ( image );
A description of each parameter follows:
Method IsOpaqueImage returns False if the image has one or more pixels that are transparent otherwise True is returned.
The format of the IsOpaqueImage method is:
unsigned int IsOpaqueImage ( Image *image );
A description of each parameter follows:
Method IsPseudoClass returns True if the image is PseudoClass and has 256 unique colors or less. If the image is DirectClass and has 256 colors or less, the image is demoted to PseudoClass.
The format of the IsPseudoClass method is:
unsigned int IsPseudoClass ( Image *image );
A description of each parameter follows.
Method ListColors reads the X client color database and returns a list of colors contained in the database sorted in ascending alphabetic order.
The format of the ListColors function is:
filelist=ListColors ( pattern, number_colors );
A description of each parameter follows:
Method QueryColorDatabase looks up a RGB values for a color given in the target string.
The format of the QueryColorDatabase method is:
unsigned int QueryColorDatabase ( const char *target, PixelPacket *color );
A description of each parameter follows:
Method QueryColorName returns the name of the color that is closest to the supplied color in RGB space.
The format of the QueryColorName method is:
unsigned int QueryColorName ( const PixelPacket *color, char *name );
A description of each parameter follows.