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, wait
convertARGBColorToDisplayColor, getOptionalHeader, getStride
public boolean canRead(Image image)
MicroUIRawImageGeneratorExtension
canRead
in interface MicroUIRawImageGeneratorExtension
image
- the source image.public int get(int x, int y)
MicroUIRawImageGeneratorExtension
get
in interface MicroUIRawImageGeneratorExtension
x
- the pixel X-coordinatey
- the pixel Y-coordinatepublic int getHeight()
MicroUIRawImageGeneratorExtension
getHeight
in interface MicroUIRawImageGeneratorExtension
public Image getImage()
public int getWidth()
MicroUIRawImageGeneratorExtension
getWidth
in interface MicroUIRawImageGeneratorExtension