| 패키지 | mx.graphics.codec |
| 인터페이스 | public interface IImageEncoder |
| 구현자 | JPEGEncoder, PNGEncoder |
| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | Flex 3 |
| 런타임 버전: | Flash Player 9, AIR 1.1 |
관련 API 요소
공용 속성
| 속성 | 정의 주체 | ||
|---|---|---|---|
| contentType : String [읽기 전용]
The MIME type for the image format that this encoder produces. | IImageEncoder | ||
공용 메서드
| 메서드 | 정의 주체 | ||
|---|---|---|---|
Encodes a BitmapData object as a ByteArray. | IImageEncoder | ||
Encodes a ByteArray object containing raw pixels
in 32-bit ARGB (Alpha, Red, Green, Blue) format
as a new ByteArray object containing encoded image data. | IImageEncoder | ||
속성 세부 정보
contentType | 속성 |
메서드 세부 정보
encode | () | 메서드 |
public function encode(bitmapData:BitmapData):ByteArray| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | Flex 3 |
| 런타임 버전: | Flash Player 9, AIR 1.1 |
Encodes a BitmapData object as a ByteArray.
매개 변수
bitmapData:BitmapData — The input BitmapData object.
|
ByteArray — Returns a ByteArray object containing encoded image data.
|
encodeByteArray | () | 메서드 |
public function encodeByteArray(byteArray:ByteArray, width:int, height:int, transparent:Boolean = true):ByteArray| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | Flex 3 |
| 런타임 버전: | Flash Player 9, AIR 1.1 |
Encodes a ByteArray object containing raw pixels in 32-bit ARGB (Alpha, Red, Green, Blue) format as a new ByteArray object containing encoded image data. The original ByteArray is left unchanged.
매개 변수
byteArray:ByteArray — The input ByteArray object containing raw pixels.
This ByteArray should contain
4 width height bytes.
Each pixel is represented by 4 bytes, in the order ARGB.
The first four bytes represent the top-left pixel of the image.
The next four bytes represent the pixel to its right, etc.
Each row follows the previous one without any padding.
| |
width:int — The width of the input image, in pixels.
| |
height:int — The height of the input image, in pixels.
| |
transparent:Boolean (default = true) — If false,
alpha channel information is ignored.
|
ByteArray — Returns a ByteArray object containing encoded image data.
|
Tue Jun 12 2018, 03:17 PM Z