quantize - Methods to Reduce the Number of Unique Colors in an Image
QuantizeInfo * CloneQuantizeInfo( const QuantizeInfo *quantize_info );
DestroyQuantizeInfo( QuantizeInfo *quantize_info );
GetQuantizeInfo( QuantizeInfo *quantize_info );
unsigned int MapImage( Image *image, Image *map_image, const unsigned int dither );
unsigned int MapImages( Image *images, Image *map_image, const unsigned int dither );
unsigned int QuantizationError( Image *image );
unsigned int QuantizeImage( const QuantizeInfo *quantize_info, Image *image );
unsigned int QuantizeImages( const QuantizeInfo *quantize_info, Image *images );
Method CloneQuantizeInfo makes a duplicate of the given quantize info structure, or if quantize info is NULL, a new one.
The format of the CloneQuantizeInfo method is:
QuantizeInfo *CloneQuantizeInfo ( const QuantizeInfo *quantize_info );
A description of each parameter follows:
Method DestroyQuantizeInfo deallocates memory associated with an QuantizeInfo structure.
The format of the DestroyQuantizeInfo method is:
DestroyQuantizeInfo ( QuantizeInfo *quantize_info );
A description of each parameter follows:
Method GetQuantizeInfo initializes the QuantizeInfo structure.
The format of the GetQuantizeInfo method is:
GetQuantizeInfo ( QuantizeInfo *quantize_info );
A description of each parameter follows:
MapImage replaces the colors of an image with the closest color from a reference image.
The format of the MapImage method is:
unsigned int MapImage ( Image *image, Image *map_image, const unsigned int dither );
A description of each parameter follows:
MapImages replaces the colors of a sequence of images with the closest color from a reference image.
The format of the MapImage method is:
unsigned int MapImages ( Image *images, Image *map_image, const unsigned int dither );
A description of each parameter follows:
Method QuantizationError measures the difference between the original and quantized images. This difference is the total quantization error. The error is computed by summing over all pixels in an image the distance squared in RGB space between each reference pixel value and its quantized value. These values are computed:
The format of the QuantizationError method is:
unsigned int QuantizationError ( Image *image );
A description of each parameter follows.
Method QuantizeImage analyzes the colors within a reference image and chooses a fixed number of colors to represent the image. The goal of the algorithm is to minimize the difference between the input and output image while minimizing the processing time.
The format of the QuantizeImage method is:
unsigned int QuantizeImage ( const QuantizeInfo *quantize_info, Image *image );
A description of each parameter follows:
QuantizeImages analyzes the colors within a set of reference images and chooses a fixed number of colors to represent the set. The goal of the algorithm is to minimize the difference between the input and output images while minimizing the processing time.
The format of the QuantizeImages method is:
unsigned int QuantizeImages ( const QuantizeInfo *quantize_info, Image *images );
A description of each parameter follows: