Posted By

magickaito on 10/07/10


Tagged

flash


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

tombarc
MacNinja
liakwee


Save bitmapdata of a movieclip into a jpg


 / Published in: ActionScript 3
 

  1. var data:BitmapData = new BitmapData(FinalImage.imageWidth, FinalImage.imageHeight, false, 0xFFFFFF);
  2. data.draw(_finalImageSection);
  3. var jpgEncoder:JPGEncoder = new JPGEncoder(100);
  4. var jpgBytes:ByteArray = jpgEncoder.encode(data);
  5. var imagesFilter:FileFilter = new FileFilter("Images", "*.jpg");
  6. new FileReference().save(jpgBytes, "clue.jpg");

Report this snippet  

You need to login to post a comment.