% %
% %
% %
-% C o m p r e s s C o l o r m a p T r a n s F i r s t %
+% O p t i m i z e P N G C o l o r m a p %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% CompressColormapTransFirst compresses an image colormap removing
+% OptimizePNGColormap compresses an image colormap removing
% any duplicate and unused color entries and putting the transparent colors
% first. Returns MagickTrue on success, MagickFalse on error.
%
-% The format of the CompressColormapTransFirst method is:
+% The format of the OptimizePNGColormap method is:
%
-% unsigned int CompressColormapTransFirst(Image *image)
+% unsigned int OptimizePNGColormap(Image *image)
%
% A description of each parameter follows:
%
% This function updates image->colors and image->colormap.
%
*/
-static MagickBooleanType CompressColormapTransFirst(Image *image)
+static MagickBooleanType OptimizePNGColormap(Image *image)
{
int
remap_needed,
assert(image->signature == MagickSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " CompressColorMapTransFirst %s (%.20g colors)",image->filename,
+ " OptimizePNGColormap %s (%.20g colors)",image->filename,
(double) image->colors);
if (image->storage_class != PseudoClass || image->colors > 256 ||
image->colors < 2)
if (image->debug != MagickFalse)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Background in CompressColormapTransFirst=%d (%d,%d,%d)",
+ " Background in OptimizePNGColormap=%d (%d,%d,%d)",
(int) i,(int) image->colormap[i].red,
(int) image->colormap[i].green,
(int) image->colormap[i].blue);
if (image->debug != MagickFalse)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Dupe CompressColormapTransFirst=%d(%d,%d,%d)=%d(%d,%d,%d)",
+ " Dupe OptimizePNGColormap=%d(%d,%d,%d)=%d(%d,%d,%d)",
(int) j,
(int) image->colormap[j].red,
(int) image->colormap[j].green,
if (image->debug != MagickFalse)
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " new_number_colors in CompressColormapTransFirst=%d",
+ " new_number_colors in OptimizePNGColormap=%d",
(int) new_number_colors);
}
if ((!have_transparency || (marker[0] &&
if (IsColorEqual(image->colormap+i,&image->background_color))
{
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " Background in CompressColormapTransFirst=%d (%d,%d,%d)",
+ " Background in OptimizePNGColormap=%d (%d,%d,%d)",
(int) i,(int) image->colormap[i].red,
(int) image->colormap[i].green,
(int) image->colormap[i].blue);
}
#endif
+static MagickBooleanType CompressColormapTransFirst(Image *image)
+{
+ return OptimizePNGColormap(image);
+}
+
static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
const ImageInfo *image_info,Image *image)
{