diff options
| author | Lars Magne Ingebrigtsen | 2013-08-15 19:26:34 +0200 |
|---|---|---|
| committer | Lars Magne Ingebrigtsen | 2013-08-15 19:26:34 +0200 |
| commit | 6f94cbbcb5cefde19de8fff03834f3c8cb5f6e6d (patch) | |
| tree | 0706f70c7ddf0ca60a5d1662f9a222a1e7e4ce18 /src/image.c | |
| parent | 10fa0ed32868f8a1c6efb68a8f2d47fec88d9064 (diff) | |
| download | emacs-6f94cbbcb5cefde19de8fff03834f3c8cb5f6e6d.tar.gz emacs-6f94cbbcb5cefde19de8fff03834f3c8cb5f6e6d.zip | |
(imagemagick_compute_animated_image): Clean up code slightly
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 15 |
1 files changed, 5 insertions, 10 deletions
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) | |||
| 7929 | dest = PixelGetNextIteratorRow (dest_iterator, &dest_width); | 7929 | dest = PixelGetNextIteratorRow (dest_iterator, &dest_width); |
| 7930 | for (x = 0; x < source_width; x++) | 7930 | for (x = 0; x < source_width; x++) |
| 7931 | { | 7931 | { |
| 7932 | if (dispose == BackgroundDispose) | 7932 | /* Normally we only copy over non-transparent pixels, |
| 7933 | but if the disposal method is "Background", then we | ||
| 7934 | copy over all pixels. */ | ||
| 7935 | if (dispose == BackgroundDispose || | ||
| 7936 | PixelGetAlpha (source[x])) | ||
| 7933 | { | 7937 | { |
| 7934 | PixelGetMagickColor (source[x], &pixel); | 7938 | PixelGetMagickColor (source[x], &pixel); |
| 7935 | PixelSetMagickColor (dest[x], &pixel); | 7939 | PixelSetMagickColor (dest[x], &pixel); |
| 7936 | } | 7940 | } |
| 7937 | else | ||
| 7938 | { | ||
| 7939 | /* Copy over non-transparent pixels. */ | ||
| 7940 | if (PixelGetAlpha (source[x])) | ||
| 7941 | { | ||
| 7942 | PixelGetMagickColor (source[x], &pixel); | ||
| 7943 | PixelSetMagickColor (dest[x], &pixel); | ||
| 7944 | } | ||
| 7945 | } | ||
| 7946 | } | 7941 | } |
| 7947 | PixelSyncIterator(dest_iterator); | 7942 | PixelSyncIterator(dest_iterator); |
| 7948 | } | 7943 | } |