Packagemx.graphics.codec
Classpublic class PNGEncoder
InheritancePNGEncoder Inheritance Object
Implements IImageEncoder

An implementation of IImageEncoder that encoders raw bitmaps as encoded images using Portable Network Graphics (PNG) lossless compression.



Public Properties
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  contentType : String
[read-only] The MIME type for the PNG encoded image.
PNGEncoder
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
Public Methods
 MethodDefined By
  
PNGEncoder
  
Converts the pixels of raw BitmapData to a PNG encoded ByteArray.
PNGEncoder
  
encodeByteArray(raw:ByteArray, width:int, height:int, transparent:Boolean = true):ByteArray
Converts the ByteArray of pixels from a raw bitmap to a PNG encoded ByteArray.
PNGEncoder
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Public Constants
 ConstantDefined By
  CONTENT_TYPE : String = "image/png"
[static]
PNGEncoder
Property Detail
contentTypeproperty
contentType:String  [read-only]

The MIME type for the PNG encoded image.


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

Converts the pixels of raw BitmapData to a PNG encoded ByteArray.

Parameters

image:BitmapData

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

Converts the ByteArray of pixels from a raw bitmap to a PNG encoded ByteArray. If transparent is set to false, 4 bytes must still be sent per pixel for ARGB, however, the alpha channel information will be ignored.

Parameters

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

Returns
ByteArray
Constant Detail
CONTENT_TYPEConstant
public static const CONTENT_TYPE:String = "image/png"




 

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/PNGEncoder.html