diff options
Diffstat (limited to 'src')
| -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 | } |