Re: Animated GIF to SWF?
[email protected] (Wolfgang Hamann) Thu, 13 Nov 2003 00:22:42 +0100 (CET)
| Newsgroups | gmane.comp.web.ming.general |
|---|---|
| Message-ID | <wolfgang-1031113002242.A027324@loopback> |
Hi,
at least libungif - the one I used here, not sure about previous libgif - already contains
support for converting an animated gif into a series of images, so adding an extra call
to this should not be hard.
On the other side, the return type would likely be an array of bitmaps - unlike scalar types,
every language binding (php, perl, python) has ist own unique way to do that (or perhaps
none at all) so there will be more code on the interfaces than on the image handling.
Once this is solved, the typical application would be (php style)
$bitmaps = SWFbitmaps_fromAniGif(fopen("x.gif", "r")); // note we get an array of new SWFBitmaps rather than new array
for($n = 0 ; $n < count($bitmaps) ; $n++)
{ // add $bitmaps[$n] here, then
$movie->nextFrame();
}
How much demand is there for the feature? I am well aware that putting this kind of
stuff into ming might be helpful - some hosts will install ming as part of their php package
but will not allow to run imagemagick or other external programs
Wolfgang