Guida di riferimento di ActionScript® 3.0 per la piattaforma Adobe® Flash®
Home  |  Nascondi elenco pacchetti e classi |  Pacchetti  |  Classi  |  Novità  |  Indice  |  Appendici  |  Perché in inglese?
Filtri: Recupero dati dal server...
Recupero dati dal server...
mx.graphics.codec 

IImageEncoder  - AS3 Flex

Pacchettomx.graphics.codec
Interfacciapublic interface IImageEncoder
Implementatori JPEGEncoder, PNGEncoder

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 3
Versioni runtime: Flash Player 9, AIR 1.1

The IImageEncoder interface defines the interface that image encoders implement to take BitmapData objects, or ByteArrays containing raw ARGB pixels, as input and convert them to popular image formats such as PNG or JPEG.

Elementi API correlati



Proprietà pubbliche
 ProprietàDefinito da
  contentType : String
[sola lettura] The MIME type for the image format that this encoder produces.
IImageEncoder
Metodi pubblici
 MetodoDefinito da
  
Encodes a BitmapData object as a ByteArray.
IImageEncoder
  
encodeByteArray(byteArray:ByteArray, width:int, height:int, transparent:Boolean = true):ByteArray
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
Descrizione delle proprietà

contentType

proprietà
contentType:String  [sola lettura]

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 3
Versioni runtime: Flash Player 9, AIR 1.1

The MIME type for the image format that this encoder produces.



Implementazione
    public function get contentType():String
Descrizione dei metodi

encode

()metodo
public function encode(bitmapData:BitmapData):ByteArray

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 3
Versioni runtime: Flash Player 9, AIR 1.1

Encodes a BitmapData object as a ByteArray.

Parametri

bitmapData:BitmapData — The input BitmapData object.

Restituisce
ByteArray — Returns a ByteArray object containing encoded image data.

encodeByteArray

()metodo 
public function encodeByteArray(byteArray:ByteArray, width:int, height:int, transparent:Boolean = true):ByteArray

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 3
Versioni runtime: 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.

Parametri

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.

Restituisce
ByteArray — Returns a ByteArray object containing encoded image data.




[ X ]Perché in inglese?
Il contenuto della Guida di riferimento di ActionScript 3.0 appare in inglese

Non tutte le parti della Guida di riferimento di ActionScript 3.0 sono tradotte in tutte le lingue. Quando un elemento del linguaggio non è tradotto, viene riportato in inglese. Ad esempio, la classe ga.controls.HelpBox non è tradotta in nessuna lingua. Pertanto, nella versione italiana della guida di riferimento, la descrizione della classe ga.controls.HelpBox è riportata in inglese.