Packagemx.graphics.codec
Interfacepublic interface IImageEncoder
ImplementorsJPEGEncoder, PNGEncoder

Image encoders take raw bitmaps and convert them to popular formats such as PNG or JPEG.

See also

PNGEncoder
JPEGEncoder


Public Properties
 PropertyDefined By
  contentType : String
[read-only] The MIME type for the encoded image format.
IImageEncoder
Public Methods
 MethodDefined By
  
Encodes a raw BitmapData as a ByteArray.
IImageEncoder
  
encodeByteArray(raw:ByteArray, width:int, height:int, transparent:Boolean = true):ByteArray
Encodes a raw bitmap ByteArray as a new ByteArray.
IImageEncoder
Property Detail
contentTypeproperty
contentType:String  [read-only]

The MIME type for the encoded image format.


Implementation
    public function get contentType():String
Method Detail
encode()method
public function encode(image:BitmapData):ByteArray

Encodes a raw BitmapData as a ByteArray.

Parameters

image:BitmapData

Returns
ByteArray
encodeByteArray()method 
public function encodeByteArray(raw:ByteArray, width:int, height:int, transparent:Boolean = true):ByteArray

Encodes a raw bitmap ByteArray as a new ByteArray. The ByteArray must be written using 4 bytes per pixel as ARGB, however, if the transparent flag is set to false the alpha channel information will be ignored.

Parameters

raw:ByteArray
 
width:int
 
height:int
 
transparent:Boolean (default = true)

Returns
ByteArray




 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/common/langref/mx/graphics/codec/IImageEncoder.html