/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
import mx.graphics.codec.JPEGEncoder; import flash.utils.ByteArray; var encoder:JPEGEncoder = new JPEGEncoder(90); var byteArray:ByteArray = encoder.encode(bitmapData)); // result: byteArray
URL: http://blog.yoz.sk/2009/10/bitmap-bitmapdata-bytearray/