Methods Summary |
---|
public int | alphaLevelsNumber()
/**
* TBD: get display for current MIDlet
* javax.microedition.lcdui.Display d = ...;
* return d.numAlphaLevels();
*/
return 2;
|
public int | getImageHeight(java.lang.Object image)
if (!(image instanceof Image))
return -1;
Image img = (Image)image;
return img.getHeight();
|
public int | getImageWidth(java.lang.Object image)
if (!(image instanceof Image))
return -1;
Image img = (Image)image;
return img.getWidth();
|
public byte[] | getRGBByteImageData(java.lang.Object image)
return FormatConversionUtils.
intArrayToByteArray(getRGBIntImageData(image));
|
public int[] | getRGBIntImageData(java.lang.Object image)
if (!(image instanceof Image))
return null;
Image img = (Image)image;
int w = img.getWidth();
int h = img.getHeight();
int[] data = new int[w * h];
img.getRGB(data, 0, w, 0, 0, w, h);
return data;
|
public java.lang.Object | imageCreateFromByteArray(byte[] data, int offset, int length)
return Image.createImage(data, offset, length);
|
public java.lang.Object | imageCreateFromImage(java.lang.Object image)
if (!(image instanceof Image))
return null;
Image img = (Image)image;
return Image.createImage(img);
|
public java.lang.Object | imageCreateFromStream(java.io.InputStream stream)
if (stream == null)
return null;
Image image = null;
try {
image = Image.createImage(stream);
} catch (java.io.IOException ioe) {
return null;
}
return image;
|
public boolean | isImage(java.lang.Object image)
return (image instanceof Image);
|
public boolean | isMutableImage(java.lang.Object image)
Image img = (Image)image;
return img.isMutable();
|