Subject: Re: bug#14700: 24.3.50; Animated ImageMagick images doesn't work

From: Lars Magne Ingebrigtsen <[email-masked]>
Date: Thu, 15 Aug 2013 15:59:10 +0200

Glenn Morris <[email-masked]> writes:

> There's an "animate" command-line program that is part of ImageMagick,
> and it seems to do fine on the examples from
> http://www.imagemagick.org/Usage/anim_basics/
>
> So maybe the source of that will have clues...

Thanks.  I've started reading the source code now.  Unfortunately, it's
written in an oldee-stylee C manner, meaning that no function is less
than 1500 lines...  *sigh*

I've looked at Chong's code in gif_load again, though, and I think I
understand what's going on now.  Animated gifs are basically just a
series of normal gifs, but wherever there's a transparent gif, we're
supposed to show the data from the previous gif.  So to display image X,
we have to compute all images from 0 to X and apply the transparencies.

Doing this in imagemagick_load in the same manner shouldn't be too
difficult, I think.  The information is available -- i.e., we just need
to know what the transparent colour is, and then the rest is just
looping and constructing the resulting image.

Reusing the code in gif_load directly doesn't seem like the best option
(it's creating X structures directly, if I interpret it correctly), so I
think I'll have a whack at implementing a imagemagick_compute_scene
function by peeking at Chong's code heavily.

-- 
(domestic pets only, the antidote for overdose, milk.)
  No Gnus T-Shirt for sale: http://ingebrigtsen.no/no.php
  and http://lars.ingebrigtsen.no/2013/08/twenty-years-of-september.html