'encoding'에 해당되는 글 1건

  1. [2007/06/01] AS3 GIF Animation Encoding Class 0.1 (9)

AS3 GIF Animation Encoding Class 0.1

[FLASH/Reference]

AS3 GIF Animation Encoding Class 0.1 [ by Thibault Imbert ]

GIF Animation Encoder 0.1

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 :

// we create the GIF encoder
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 :)


GIF Encoder on Screen

출처 : http://www.bytearray.org/

2007/06/01 16:40 2007/06/01 16:40