From 4ce82fb8d9232e123d9e58b00851b775d1586646 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Wed, 14 Aug 2013 15:50:03 +0200 Subject: [PATCH] * image.c (imagemagick_load_image): Make animated pictures work. There's still some problems with background color settings, though. Fixes: debbugs:14700 --- src/ChangeLog | 4 ++++ src/image.c | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index eeae85a888c..548ae5ab2c0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2013-08-14 Lars Magne Ingebrigtsen + * image.c (imagemagick_load_image): Make animated pictures work. + There's still some problems with background color settings, though + (bug#14700). + * decompress.c (unwind_decompress): Always restore point. 2013-08-14 Paul Eggert diff --git a/src/image.c b/src/image.c index d93d1b517bf..b2d6726c1a4 100644 --- a/src/image.c +++ b/src/image.c @@ -7967,6 +7967,16 @@ imagemagick_load_image (struct frame *f, struct image *img, goto imagemagick_error; } + /* If we have an animated image, get the new wand based on the + "super-wand". */ + if (ino > 0) + { + MagickWand *super_wand = image_wand; + MagickSetIteratorIndex (super_wand, ino); + image_wand = MagickGetImage (super_wand); + DestroyMagickWand (super_wand); + } + /* Retrieve the frame's background color, for use later. */ { XColor bgcolor; -- 2.39.5