]> git.eshelyaron.com Git - emacs.git/commitdiff
(imagemagick_compute_animated_image): Clean up code slightly
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Thu, 15 Aug 2013 17:26:34 +0000 (19:26 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Thu, 15 Aug 2013 17:26:34 +0000 (19:26 +0200)
src/image.c

index 3c5ee4ce66f5e8df33f8aa02b4e095ea8061aa23..bc9f9ab123a7d7bf1c626b0711d4eadd4c2c4bd5 100644 (file)
@@ -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);
        }