Packagesekati.formats
Classpublic class JPGEncoder

JPGEncoder provides conversion from Bitmap to valid JPG file format.


Example
  var jpg : JPGEncoder = new JPGEncoder( 80 );
  var jpgData : ByteArray = jpg.encode( bitmapDataObj );
  

See also

http://en.wikipedia.org/wiki/Jpeg


Public Methods
 MethodDefined by
  
JPGEncoder(quality:Number = 50)
JPGEncoder Constructor
JPGEncoder
  
encode(image:BitmapData):ByteArray
Created a JPG image from the specified BitmapData.
JPGEncoder
Constructor detail
JPGEncoder()constructor
public function JPGEncoder(quality:Number = 50)

JPGEncoder Constructor

Parameters
quality:Number (default = 50) — The quality level between 1 - 100 that detrmines the level of compression used in the generated JPG
Method detail
encode()method
public function encode(image:BitmapData):ByteArray

Created a JPG image from the specified BitmapData.

Parameters
image:BitmapData — The BitmapData that will be converted into the JPG format.

Returns
ByteArray — a ByteArray representing the JPG encoded image data.