|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.flagstone.transform.image.DefineJPEGImage
public final class DefineJPEGImage
DefineJPEGImage is used to define a JPEG encoded image.
DefineJPEGImage objects only contain the image data, the encoding table for the image is defined in a JPEGEncodingTable object. All images using a shared JPEGEncodingTable object to represent the encoding table have the same compression ratio.
Although the DefineJPEGImage class is supposed to be used with the JPEGEncodingTable class which defines the encoding table for the images it is not essential. If an JPEGEncodingTable object is created with an empty encoding table then the Flash Player will still display the JPEG image correctly if the encoding table is included in the image data.
JPEGEncodingTable,
DefineJPEGImage2,
DefineJPEGImage3| Constructor Summary | |
|---|---|
DefineJPEGImage(DefineJPEGImage object)
Creates and initialises a DefineJPEGImage object using the values copied from another DefineJPEGImage object. |
|
DefineJPEGImage(int uid,
byte[] bytes)
Creates a DefineJPEGImage object with the identifier and JPEG data. |
|
DefineJPEGImage(SWFDecoder coder)
Creates and initialises a DefineJPEGImage object using values encoded in the Flash binary format. |
|
| Method Summary | |
|---|---|
DefineJPEGImage |
copy()
Creates a complete copy of this object. |
void |
encode(SWFEncoder coder,
Context context)
Encode an object to the Flash binary format. |
int |
getHeight()
Get the height of the image in pixels (not twips). |
int |
getIdentifier()
Get the unique identifier assigned to this object. |
byte[] |
getImage()
Get a copy of the image. |
int |
getWidth()
Get the width of the image in pixels. |
int |
prepareToEncode(Context context)
Prepare an object for encoding, returning the expected size of an object when it is encoded. |
void |
setIdentifier(int uid)
Sets the unique identifier for an object within a given Movie. |
void |
setImage(byte[] bytes)
Sets the image data. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefineJPEGImage(SWFDecoder coder)
throws IOException
coder - an SWFDecoder object that contains the encoded Flash data.
IOException - if an error occurs while decoding the data.
public DefineJPEGImage(int uid,
byte[] bytes)
uid - the unique identifier for this object. Must be in the range
1..65535.bytes - the JPEG encoded image data. Must not be null.public DefineJPEGImage(DefineJPEGImage object)
object - a DefineJPEGImage object from which the values will be
copied.| Method Detail |
|---|
public int getIdentifier()
getIdentifier in interface DefineTagpublic void setIdentifier(int uid)
setIdentifier in interface DefineTaguid - a unique identifier for the object. Must be in the range
1..65535.public int getWidth()
getWidth in interface ImageTagpublic int getHeight()
getHeight in interface ImageTagpublic byte[] getImage()
public void setImage(byte[] bytes)
bytes - a list of bytes containing the image data. Must not be null
or empty.public DefineJPEGImage copy()
copy in interface Copyable<MovieTag>public String toString()
toString in class Objectpublic int prepareToEncode(Context context)
prepareToEncode in interface SWFEncodeablecontext - an Context that allows information to be passed between
objects to control how they are initialised for encoding.
public void encode(SWFEncoder coder,
Context context)
throws IOException
encode in interface SWFEncodeablecoder - an SWFEncoder object.context - an Context that allows information to be passed between
objects to control how they are initialised for encoding.
IOException - if an error occurs while encoding the object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||