]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 29 Jul 2012 13:58:11 +0000 (13:58 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 29 Jul 2012 13:58:11 +0000 (13:58 +0000)
MagickWand/magick-image.c
MagickWand/magick-image.h

index dc83a4a4093ac5cc932e6c8de027681b814e8c48..c01f4e2e738d1008bee28ee7003fb924854eaf53 100644 (file)
@@ -7341,6 +7341,46 @@ WandExport MagickWand *MagickOptimizeImageLayers(MagickWand *wand)
 %                                                                             %
 %                                                                             %
 %                                                                             %
+%   M a g i c k O p t i m i z e I m a g e T r a n s p a r e n c y             %
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%  MagickOptimizeImageTransparency() takes a frame optimized GIF animation, and
+%  compares the overlayed pixels against the disposal image resulting from all
+%  the previous frames in the animation.  Any pixel that does not change the
+%  disposal image (and thus does not effect the outcome of an overlay) is made
+%  transparent.
+%
+%  WARNING: This modifies the current images directly, rather than generate
+%  a new image sequence.
+%  The format of the MagickOptimizeImageTransparency method is:
+%
+%      MagickBooleanType MagickOptimizeImageTransparency(MagickWand *wand)
+%
+%  A description of each parameter follows:
+%
+%    o wand: the magick wand.
+%
+*/
+WandExport MagickBooleanType MagickOptimizeImageTransparency(MagickWand *wand)
+{
+  assert(wand != (MagickWand *) NULL);
+  assert(wand->signature == WandSignature);
+  if( IfMagickTrue(wand->debug) )
+    (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
+  if (wand->images == (Image *) NULL)
+    return(MagickFalse);
+  OptimizeImageTransparency(wand->images,wand->exception);
+  return(MagickTrue);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%                                                                             %
+%                                                                             %
+%                                                                             %
 %     M a g i c k O r d e r e d P o s t e r i z e I m a g e                   %
 %                                                                             %
 %                                                                             %
index 9d01f24dca7b5b4c240241bc4452f9bcbce8be0d..771c28b5e4249f7f95eadb58f33066e70fe4952d 100644 (file)
@@ -196,6 +196,7 @@ extern WandExport MagickBooleanType
   MagickOilPaintImage(MagickWand *,const double,const double),
   MagickOpaquePaintImage(MagickWand *,const PixelWand *,const PixelWand *,
     const double,const MagickBooleanType),
+  MagickOptimizeImageTransparency(MagickWand *),
   MagickOrderedPosterizeImage(MagickWand *,const char *),
   MagickTransparentPaintImage(MagickWand *,const PixelWand *,
     const double,const double,const MagickBooleanType invert),