Creating gif/bmp files with flex

Posted by dta on Stack Overflow See other posts from Stack Overflow or by dta
Published on 2010-03-15T06:31:30Z Indexed on 2010/03/15 10:09 UTC
Read the original article Hit count: 326

  public function bmdToStr(bmd:BitmapData,width:int,height:int):String {
   var encoder:JPEGEncoder = new JPEGEncoder();
   var encBytes:ByteArray = encoder.encode(bmd);
   return ImageSnapshot.encodeImageAsBase64(new ImageSnapshot(width,height,encBytes,"image/jpeg")); 
  }

As of now, I am creating JPEG image from bitmapdata as above.
I can use PNGEncoder for creating png images as well.
How do I create .bmp or .gif files?

© Stack Overflow or respective owner

Related posts about flex

Related posts about actionscript-3