AS3 GIF Animation Encoding Class 0.1 [ by Thibault Imbert ]

I have to admit that I just love animated GIF's, it reminds me the old school days playing the SNES
Recently I found a java GIF encoder and decided to implement it in AS3, ok maybe some people will say it's just unuseful but here it is, I love it !
Everything is encoded through the player. Then you know the story, the GIF stream is sent through AMFPHP to a server to download it, and then save it to your hard disk. Any kind of images can be included in the final GIF, each frame is a flash.display.BitmapData object.
I'll post the sources in a few days, I want to add some more features, stay tuned !
AS3 GIF Animation Encoder 0.1 running here
Here is how to generate an animated GIF stream in ActionScript 3 :
var myGIFEncoder:GIFEncoder = new GIFEncoder();
// we call the start method to start a new GIF file stream
myGIFEncoder.start();
// we call the setRepeat method with 0 as parameter so that it loops
myGIFEncoder.setRepeat(0);
//we add each BitmapData as frames with the addFrame method
myGIFEncoder.addFrame( new BitmapData ( 200, 200 ) );
// we finalize the GIF stream by calling the finish method
myGIFEncoder.finish();
// then you retrieve the GIF ByteArray with the stream getter
var myGIFStream:ByteArray = myGIFEncoder.stream;
Update : AS3 GIF Animation Encoder 0.1 Sources available here
The GIF Encoder looks nice on the Web Flash Festival 2007 screen



::: 사람과 사람의 교감! 人터넷의 첫 시작! 댓글을 달아주세요! :::