From: Lars Magne Ingebrigtsen Date: Thu, 15 Aug 2013 17:26:34 +0000 (+0200) Subject: (imagemagick_compute_animated_image): Clean up code slightly X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1686^2~224 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6f94cbbcb5cefde19de8fff03834f3c8cb5f6e6d;p=emacs.git (imagemagick_compute_animated_image): Clean up code slightly --- diff --git a/src/image.c b/src/image.c index 3c5ee4ce66f..bc9f9ab123a 100644 --- a/src/image.c +++ b/src/image.c @@ -7929,20 +7929,15 @@ imagemagick_compute_animated_image (MagickWand *super_wand, int ino) dest = PixelGetNextIteratorRow (dest_iterator, &dest_width); for (x = 0; x < source_width; x++) { - if (dispose == BackgroundDispose) + /* Normally we only copy over non-transparent pixels, + but if the disposal method is "Background", then we + copy over all pixels. */ + if (dispose == BackgroundDispose || + PixelGetAlpha (source[x])) { PixelGetMagickColor (source[x], &pixel); PixelSetMagickColor (dest[x], &pixel); } - else - { - /* Copy over non-transparent pixels. */ - if (PixelGetAlpha (source[x])) - { - PixelGetMagickColor (source[x], &pixel); - PixelSetMagickColor (dest[x], &pixel); - } - } } PixelSyncIterator(dest_iterator); }