-
Notifications
You must be signed in to change notification settings - Fork 26
PNG24Encoder
Nick Ryzhy edited this page Apr 4, 2016
·
9 revisions
Encodes image data using PNG-24 compression algorithm.
Name | Value |
---|---|
Package | by.blooddy.crypto.image |
Name | final class PNG24Encoder |
Inheritance |
PNG24Encoder → PNGEncoder → Process → EventDispatcher → Object
|
import by.blooddy.crypto.PNG24Encoder;
var result:ByteArray = PNG24Encoder.encode( bytes, 100, 100, PNGFilter.NONE );
import by.blooddy.crypto.PNG24Encoder;
import by.blooddy.crypto.events.ProcessEvent;
var png:PNG24Encoder = new PNG24Encoder();
png.encode( bytes, 100, 100, PNGFilter.NONE );
png.addEventListener( ProcessEvent.COMPLETE, function(event:ProcessEvent):void {
var result:ByteArray = event.data;
trace( result ); // async result
} );
png.addEventListener( ProcessEvent.ERROR, function(event:ProcessEvent):void {
var error:Error = event.data;
trace( error ); // async error
} );
Name | Description |
---|---|
encode(image:BitmapData, filter:uint=0):ByteArray |
Creates a PNG-encoded byte sequence from the specified BitmapData . Used BitmapData.encode() , if posible. |
encodeBytes(bytes:ByteArray, width:uint, height:uint, filter:uint=0):ByteArray |
Creates a PNG-encoded byte sequence from the specified ByteArray . |
Name | Description |
---|---|
PNG24Encoder() |
Creates a PNG24Encoder object. |
Name | Description |
---|---|
encode(image:BitmapData, filter:uint=0):ByteArray |
Asynchronously creates a PNG-encoded byte sequence from the specified BitmapData . Dispatched sequence of bytes in ProcessEvent . |
encodeBytes(bytes:ByteArray, width:uint, height:uint, filter:uint=0):ByteArray |
Asynchronously creates a PNG-encoded byte sequence from the specified ByteArray . Dispatched sequence of bytes in ProcessEvent . |
Name | Type | Description |
---|---|---|
complete |
ProcessEvent | Dispatched when success. |
error |
ProcessEvent | Dispatched when fault. |