NAMEcolor - Count the Colors in an Image
SYNOPSISconst ColorInfo ** GetColorInfoList( const char *pattern, unsigned long *number_colors ); char ** GetColorList( const char *pattern, unsigned long *number_colors ); unsigned long GetImageHistogram( const Image *image, unsigned long *number_colors, ExceptionInfo *exception ); GetMagickPixelPacket( const Image *image, MagickPixelPacket *pixel ); unsigned long GetNumberColors( const Image *image, FILE *file, ExceptionInfo *exception ); MagickBooleanType IsGrayImage( const Image *image, ExceptionInfo *exception ); MagickBooleanType IsMonochromeImage( const Image *image, ExceptionInfo *exception ); MagickBooleanType IsOpaqueImage( const Image *image, ExceptionInfo *exception ); MagickBooleanType IsPaletteImage( const Image *image, ExceptionInfo *exception ); MagickBooleanType ListColorInfo( FILE *file, ExceptionInfo *exception ); MagickBooleanType LoadColorLists( const char *filename, ExceptionInfo *exception ); MagickBooleanType QueryColorDatabase( const char *name, PixelPacket *color, ExceptionInfo *exception ); MagickBooleanType QueryColorname( const Image *image, const PixelPacket *color, const ComplianceType compliance, char *name, ExceptionInfo *exception ); MagickBooleanType QueryMagickColor( const char *name, MagickPixelPacket *color, ExceptionInfo *exception );
FUNCTION DESCRIPTIONS
GetColorInfoListGetColorInfoList() returns any colors that match the specified pattern. The format of the GetColorInfoList function is: const ColorInfo **GetColorInfoList ( const char *pattern, unsigned long *number_colors ); A description of each parameter follows:
GetColorListGetColorList() returns any colors that match the specified pattern. The format of the GetColorList function is: char **GetColorList ( const char *pattern, unsigned long *number_colors ); A description of each parameter follows:
GetImageHistogramGetImageHistogram() returns the unique colors in an image. The format of the GetImageHistogram method is: unsigned long GetImageHistogram ( const Image *image, unsigned long *number_colors, ExceptionInfo *exception ); A description of each parameter follows.
GetMagickPixelPacketGetMagickPixelPacket() initializes the MagickPixelPacket structure. The format of the GetMagickPixelPacket method is: GetMagickPixelPacket ( const Image *image, MagickPixelPacket *pixel ); A description of each parameter follows:
GetNumberColorsGetNumberColors() returns the number of unique colors in an image. The format of the GetNumberColors method is: unsigned long GetNumberColors ( const Image *image, FILE *file, ExceptionInfo *exception ); A description of each parameter follows.
IsGrayImageIsGrayImage() returns MagickTrue if all the pixels in the image have the same red, green, and blue intensities. The format of the IsGrayImage method is: MagickBooleanType IsGrayImage ( const Image *image, ExceptionInfo *exception ); A description of each parameter follows:
IsMonochromeImageIsMonochromeImage() returns MagickTrue if all the pixels in the image have the same red, green, and blue intensities and the intensity is either 0 or MaxRGB. The format of the IsMonochromeImage method is: MagickBooleanType IsMonochromeImage ( const Image *image, ExceptionInfo *exception ); A description of each parameter follows:
IsOpaqueImageIsOpaqueImage() returns MagickTrue if none of the pixels in the image have an opacity value other than opaque ( 0 ) . The format of the IsOpaqueImage method is: MagickBooleanType IsOpaqueImage ( const Image *image, ExceptionInfo *exception ); A description of each parameter follows:
IsPaletteImageIsPaletteImage() returns MagickTrue if the image is PseudoClass and has 256 unique colors or less. The format of the IsPaletteImage method is: MagickBooleanType IsPaletteImage ( const Image *image, ExceptionInfo *exception ); A description of each parameter follows.
ListColorInfoListColorInfo() lists color names to the specified file. Color names are a convenience. Rather than defining a color by its red, green, and blue intensities just use a color name such as white, blue, or yellow. The format of the ListColorInfo method is: MagickBooleanType ListColorInfo ( FILE *file, ExceptionInfo *exception ); A description of each parameter follows.
LoadColorLists
The format of the LoadColorLists method is: MagickBooleanType LoadColorLists ( const char *filename, ExceptionInfo *exception ); A description of each parameter follows:
QueryColorDatabaseQueryColorDatabase() returns the red, green, blue, and opacity intensities for a given color name. The format of the QueryColorDatabase method is: MagickBooleanType QueryColorDatabase ( const char *name, PixelPacket *color, ExceptionInfo *exception ); A description of each parameter follows:
QueryColornameQueryColorname() returns a named color for the given color intensity. If an exact match is not found, a hex value is return instead. For example an intensity of rgb: ( 0, 0, 0 ) returns black whereas rgb: ( 223, 223, 223 ) returns #dfdfdf. The format of the QueryColorname method is: MagickBooleanType QueryColorname ( const Image *image, const PixelPacket *color, const ComplianceType compliance, char *name, ExceptionInfo *exception ); A description of each parameter follows.
QueryMagickColorQueryMagickColor() returns the red, green, blue, and opacity intensities for a given color name. The format of the QueryMagickColor method is: MagickBooleanType QueryMagickColor ( const char *name, MagickPixelPacket *color, ExceptionInfo *exception ); A description of each parameter follows:
|