| Package | de.popforge.imageprocessing.formats |
| Class | public final class PNG |
First implementation by Tinic Uro. Using modified version from Patrick Mineault.
Additional changes were made by Joa Ebert to reduce memory costs, optimize the speed once more and to fit the code into the whole Imageprocessng library.
| Method | Defined by | ||
|---|---|---|---|
|
defaulEncode(bitmapData:BitmapData):ByteArray
[static]
Encodes a BitmapData object into a ByteArray containing a PNG file using default parameters.
| PNG | ||
|
encode(bitmapData:BitmapData, type:int = 0):ByteArray
[static]
Encodes a BitmapData object into a ByteArray containing a PNG file.
| PNG | ||
| Constant | Defined by | ||
|---|---|---|---|
| RGB : int = 1 [static]
Constant for RGB encoding.
| PNG | ||
| RGBA : int = 0 [static]
Constant for RGBA encoding.
| PNG | ||
| defaulEncode | () | method |
public static function defaulEncode(bitmapData:BitmapData):ByteArrayEncodes a BitmapData object into a ByteArray containing a PNG file using default parameters.
ParametersbitmapData:BitmapData — The input BitmapData.
|
ByteArray — A ByteArray containing a PNG file
|
| encode | () | method |
public static function encode(bitmapData:BitmapData, type:int = 0):ByteArrayEncodes a BitmapData object into a ByteArray containing a PNG file.
ParametersbitmapData:BitmapData — The input BitmapData.
|
|
type:int (default = 0) — PNG.RGB for images without alpha-channel and PNG.RGBA for images with alpha-channel.
|
ByteArray — A ByteArray containing a PNG file.
|
| RGB | constant |
public static const RGB:int = 1Constant for RGB encoding.
| RGBA | constant |
public static const RGBA:int = 0Constant for RGBA encoding.