| Package | mx.graphics.codec |
| Class | public class JPEGEncoder |
| Inheritance | JPEGEncoder Object |
| Implements | IImageEncoder |
| Property | Defined By | ||
|---|---|---|---|
![]() | constructor : 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 JPEG encoded image.
| JPEGEncoder | ||
![]() | prototype : Object
[static]
A reference to the prototype object of a class or function object.
| Object | |
| Method | Defined By | ||
|---|---|---|---|
|
JPEGEncoder(quality:Number = 50)
Constructor.
| JPEGEncoder | ||
|
Converts the pixels of raw BitmapData to a JPG encoded ByteArray.
| JPEGEncoder | ||
|
Converts the ByteArray of pixels from a raw bitmap to a JPG encoded
ByteArray.
| JPEGEncoder | ||
![]() |
Indicates whether an object has a specified property defined.
| Object | |
![]() |
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter.
| Object | |
![]() |
Indicates whether the specified property exists and is enumerable.
| Object | |
![]() |
Sets the availability of a dynamic property for loop operations.
| Object | |
![]() |
Returns the string representation of the specified object.
| Object | |
![]() |
Returns the primitive value of the specified object.
| Object | |
| Constant | Defined By | ||
|---|---|---|---|
| CONTENT_TYPE : String = "image/jpeg" [static]
| JPEGEncoder | ||
| contentType | property |
contentType:String [read-only] The MIME type for the JPEG encoded image.
public function get contentType():String
| JPEGEncoder | () | Constructor |
public function JPEGEncoder(quality:Number = 50)
Constructor.
Parametersquality:Number (default = 50) — A value between 1 and 100. The default is 50.
|
| encode | () | method |
public function encode(image:BitmapData):ByteArray
Converts the pixels of raw BitmapData to a JPG encoded ByteArray.
Parameters
image:BitmapData |
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 JPG encoded ByteArray. Transparency is not supported however 4 bytes must still be sent per pixel in ARGB format.
Parameters
raw:ByteArray |
|
width:int |
|
height:int |
|
transparent:Boolean (default = true) |
ByteArray |
| CONTENT_TYPE | Constant |
public static const CONTENT_TYPE:String = "image/jpeg"
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/JPEGEncoder.html