BitmapData to ByteArray


/ Published in: ActionScript 3
Save to your folder(s)



Copy this code and paste it in your HTML
  1. import mx.graphics.codec.JPEGEncoder;
  2. import flash.utils.ByteArray;
  3. var encoder:JPEGEncoder = new JPEGEncoder(90);
  4. var byteArray:ByteArray = encoder.encode(bitmapData));
  5. // result: byteArray

URL: http://blog.yoz.sk/2009/10/bitmap-bitmapdata-bytearray/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.