public class BufferedImageLoader extends Object implements MicroUIRawImageGeneratorExtension
MicroUIRawImageGeneratorExtension which uses the J2SE API
ImageIO.read(javax.imageio.stream.ImageInputStream) to read data from
the input image. This implementation considers the input image is a PNG, a
JPEG or another standard image format.
This extension can be sub-classed to specify a custom header, stride etc.
| Constructor and Description |
|---|
BufferedImageLoader() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRead(Image image)
Tells if the extension is able to read the given image.
|
int |
get(int x,
int y)
Gets the ARGB8888 pixel color at given position.
|
int |
getHeight()
Gets the current source image height in pixels.
|
Image |
getImage()
Returns the current source image used.
|
int |
getWidth()
Gets the current source image width in pixels.
|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconvertARGBColorToDisplayColor, getOptionalHeader, getStridepublic boolean canRead(Image image)
MicroUIRawImageGeneratorExtensioncanRead in interface MicroUIRawImageGeneratorExtensionimage - the source image.public int get(int x,
int y)
MicroUIRawImageGeneratorExtensionget in interface MicroUIRawImageGeneratorExtensionx - the pixel X-coordinatey - the pixel Y-coordinatepublic int getHeight()
MicroUIRawImageGeneratorExtensiongetHeight in interface MicroUIRawImageGeneratorExtensionpublic Image getImage()
public int getWidth()
MicroUIRawImageGeneratorExtensiongetWidth in interface MicroUIRawImageGeneratorExtension