|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.flagstone.transform.util.image.BMPDecoder
public final class BMPDecoder
BMPDecoder decodes Bitmap images (BMP) so they can be used in a Flash file.
| Constructor Summary | |
|---|---|
BMPDecoder()
|
|
| Method Summary | |
|---|---|
ImageTag |
defineImage(int identifier)
Create the image definition so it can be added to a movie. |
int |
getHeight()
Get the height of the image. |
byte[] |
getImage()
Get the array of bytes that make up the image. |
int |
getWidth()
Get the width of the image. |
ImageDecoder |
newDecoder()
The method implemented by all ImageDecoders in order to be registered with the ImageRegistry and used by the ImageFactory to decode images. |
void |
read(File file)
Read an image from a file. |
void |
read(InputStream stream)
Read an image from an input stream. |
void |
read(URL url)
Read an image from a file referenced by a URL. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BMPDecoder()
| Method Detail |
|---|
public void read(File file)
throws IOException,
DataFormatException
read in interface ImageDecoderfile - the path to the file.
IOException - if there is an error reading the image data.
DataFormatException - if the file contains an unsupported format.
public void read(URL url)
throws IOException,
DataFormatException
read in interface ImageDecoderurl - the reference to the file.
IOException - if there is an error reading the image data.
DataFormatException - if the file contains an unsupported format.public ImageTag defineImage(int identifier)
defineImage in interface ImageDecoderidentifier - the unique identifier used to refer to the image.
public ImageDecoder newDecoder()
newDecoder in interface ImageProviderpublic int getWidth()
getWidth in interface ImageDecoderpublic int getHeight()
getHeight in interface ImageDecoderpublic byte[] getImage()
getImage in interface ImageDecoder
public void read(InputStream stream)
throws DataFormatException,
IOException
read in interface ImageDecoderstream - the stream used to read the image data.
DataFormatException - if the file contains an unsupported format.
IOException - if there is an error reading the image data.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||