diff options
| author | Joakim Verona | 2013-08-15 19:32:02 +0200 |
|---|---|---|
| committer | Joakim Verona | 2013-08-15 19:32:02 +0200 |
| commit | 0139d01ea2cca819089cb0264c0391a72180f556 (patch) | |
| tree | 3082795783a32ef6a031c30bdbcc6571ea9da457 /src | |
| parent | dd2ec20a745d3c3436b5ca842e2c0b5bf8c7e26f (diff) | |
| parent | 6f94cbbcb5cefde19de8fff03834f3c8cb5f6e6d (diff) | |
| download | emacs-0139d01ea2cca819089cb0264c0391a72180f556.tar.gz emacs-0139d01ea2cca819089cb0264c0391a72180f556.zip | |
merge from trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/image.c | 12 |
2 files changed, 14 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c12b32ebc71..028c33848a4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * image.c (imagemagick_compute_animated_image): Respect the GIF | ||
| 4 | disposal methods. | ||
| 5 | |||
| 1 | 2013-08-15 Ken Brown <kbrown@cornell.edu> | 6 | 2013-08-15 Ken Brown <kbrown@cornell.edu> |
| 2 | 7 | ||
| 3 | * emacs.c (main): Update comment about G_SLICE_ALWAYS_MALLOC. | 8 | * emacs.c (main): Update comment about G_SLICE_ALWAYS_MALLOC. |
diff --git a/src/image.c b/src/image.c index 3cab72edf74..bc9f9ab123a 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -7887,17 +7887,20 @@ imagemagick_compute_animated_image (MagickWand *super_wand, int ino) | |||
| 7887 | else | 7887 | else |
| 7888 | composite_wand = animation_cache; | 7888 | composite_wand = animation_cache; |
| 7889 | 7889 | ||
| 7890 | for (i = max (1, animation_index); i <= ino; i++) | 7890 | for (i = max (1, animation_index + 1); i <= ino; i++) |
| 7891 | { | 7891 | { |
| 7892 | MagickWand *sub_wand; | 7892 | MagickWand *sub_wand; |
| 7893 | PixelIterator *source_iterator, *dest_iterator; | 7893 | PixelIterator *source_iterator, *dest_iterator; |
| 7894 | PixelWand **source, **dest; | 7894 | PixelWand **source, **dest; |
| 7895 | size_t source_width, dest_width; | 7895 | size_t source_width, dest_width; |
| 7896 | MagickPixelPacket pixel; | 7896 | MagickPixelPacket pixel; |
| 7897 | DisposeType dispose; | ||
| 7897 | 7898 | ||
| 7898 | MagickSetIteratorIndex (super_wand, i); | 7899 | MagickSetIteratorIndex (super_wand, i); |
| 7899 | sub_wand = MagickGetImage (super_wand); | 7900 | sub_wand = MagickGetImage (super_wand); |
| 7900 | 7901 | ||
| 7902 | dispose = MagickGetImageDispose (sub_wand); | ||
| 7903 | |||
| 7901 | source_iterator = NewPixelIterator (sub_wand); | 7904 | source_iterator = NewPixelIterator (sub_wand); |
| 7902 | if (! source_iterator) | 7905 | if (! source_iterator) |
| 7903 | { | 7906 | { |
| @@ -7926,8 +7929,11 @@ imagemagick_compute_animated_image (MagickWand *super_wand, int ino) | |||
| 7926 | dest = PixelGetNextIteratorRow (dest_iterator, &dest_width); | 7929 | dest = PixelGetNextIteratorRow (dest_iterator, &dest_width); |
| 7927 | for (x = 0; x < source_width; x++) | 7930 | for (x = 0; x < source_width; x++) |
| 7928 | { | 7931 | { |
| 7929 | /* Copy over non-transparent pixels. */ | 7932 | /* Normally we only copy over non-transparent pixels, |
| 7930 | if (PixelGetAlpha (source[x])) | 7933 | but if the disposal method is "Background", then we |
| 7934 | copy over all pixels. */ | ||
| 7935 | if (dispose == BackgroundDispose || | ||
| 7936 | PixelGetAlpha (source[x])) | ||
| 7931 | { | 7937 | { |
| 7932 | PixelGetMagickColor (source[x], &pixel); | 7938 | PixelGetMagickColor (source[x], &pixel); |
| 7933 | PixelSetMagickColor (dest[x], &pixel); | 7939 | PixelSetMagickColor (dest[x], &pixel); |