|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.siemens.mp.misc.NativeMem
com.siemens.mp.ui.Image
Field Summary | |
static int |
COLOR_BMP_8BIT
|
Constructor Summary | |
protected |
Image()
blank constructor |
|
Image(byte[] imageData)
Creates a new image from PNG/JPG/GIF/BMP byte stream |
|
Image(byte[] bytes,
int imageWidth,
int imageHeight)
Create a new b/w image from a b/w Siemens bitmap |
|
Image(byte[] bytes,
int imageWidth,
int imageHeight,
boolean transparent)
Creates a new b/w image with bpp = 2. |
|
Image(byte[] bytes,
int imageWidth,
int imageHeight,
int BitmapType)
Creates a new image from uncompressed color data. |
|
Image(Image image)
Create a new copy image |
|
Image(int imageWidth,
int imageHeight)
Create a new blank image |
|
Image(String name,
boolean doScale)
Creates a new image from PNG/JPG/GIF/BMP resource |
Method Summary | |
static Image |
createImageFromBitmap(byte[] imageData,
int imageWidth,
int imageHeight)
Create a new immutable image from a b/w Siemens bitmap stored in imageData This method is Siemens specific. |
static Image |
createImageWithoutScaling(String name)
Creates an immutable image from decoded image data obtained from the named resource. |
static Image |
createImageWithScaling(String name)
Creates an immutable image from decoded image data obtained from the named resource. |
static Image |
createRGBImage(byte[] imageData,
int imageWidth,
int imageHeight,
int BitmapType)
Creates a new image from uncompressed color data. |
static Image |
createTransparentImageFromBitmap(byte[] bytes,
int width,
int height)
Creates a new immutable b/w image with bpp=2. |
int |
getHeight()
Get the height of the image |
static Image |
getNativeImage(Image img)
|
int |
getWidth()
Get the width of the image |
static void |
mirrorImageHorizontally(Image image)
Mirrors an Image at its horizontal axis. |
static void |
mirrorImageVertically(Image image)
Mirrors an Image at its vertical axis. |
protected static void |
setNativeImage(Image img,
Image simg)
Registers the siemens image inside the lcdui image |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int COLOR_BMP_8BIT
Constructor Detail |
protected Image()
public Image(int imageWidth, int imageHeight)
public Image(Image image)
public Image(byte[] bytes, int imageWidth, int imageHeight)
public Image(byte[] bytes, int imageWidth, int imageHeight, boolean transparent)
Creates a new b/w image with bpp = 2. Every pixel within the newly created image could be
00 | - transparent |
01 | - white |
10 or 11 | - black |
bytes
- black/white Siemens bitmap with bpp = 2imageWidth
- The width of the new image, in pixelsimageHeight
- The height of the new image, in pixelstransparent
- If the image contains transparent pixels or notpublic Image(String name, boolean doScale) throws IOException
name
- The PNG ressourcedoScale
- Denotes if image should be scaled to fit onto the screen in case it is largerpublic Image(byte[] imageData)
public Image(byte[] bytes, int imageWidth, int imageHeight, int BitmapType) throws IOException
Image byte data encoding for type COLOR_BMP_8BIT
:
bytes
- the image dataimageWidth
- the width of the imageimageHeight
- the height of the imageBitmapType
- the type of the image data
IOException
- if the image type is not supportedMethod Detail |
public int getHeight()
public int getWidth()
public static Image createImageWithScaling(String name) throws IOException
If the size of the image extends the screen size the image is scaled to fit into the screen.
If this behaviour is unwanted, see
javax.microedition.lcdui.Image.createImage
.
This method is Siemens specific.
name
- the name of the resource containing the image data in one of
the supported image formats
IOException
- if the resource does not exist, the data cannot
be loaded, or the image data cannot be decodedpublic static Image createImageWithoutScaling(String name) throws IOException
If the size of the image extends the screen size overlapping regions are clipped.
If this behaviour is unwanted, see
createImageWithScaling
.
This method is Siemens specific.
This method is deprecated, don't use it! Use javax.microedition.lcdui.Image.createImage
instead!
name
- the name of the resource containing the image data in one of
the supported image formats
IOException
- if the resource does not exist, the data cannot
be loaded, or the image data cannot be decodedpublic static Image createImageFromBitmap(byte[] imageData, int imageWidth, int imageHeight)
This method is Siemens specific.
public static Image createRGBImage(byte[] imageData, int imageWidth, int imageHeight, int BitmapType) throws ArrayIndexOutOfBoundsException, IOException
Image byte data encoding for type COLOR_BMP_8BIT
:
imageData
- the image dataimageWidth
- the width of the imageimageHeight
- the height of the imageBitmapType
- the type of the image data
IOException
- if the image type is not supported
ArrayIndexOutOfBoundsException
- if width or height is equal or less than zeropublic static Image createTransparentImageFromBitmap(byte[] bytes, int width, int height)
Creates a new immutable b/w image with bpp=2. Every pixel within the newly created b/w image could be 00=transparent 01=white 10 or 11 = black The width and height of the image must both be greater than zero.
This method is Siemens specific.
width
- the width of the new image, in pixelsheight
- the height of the new image, in pixels
public static void mirrorImageHorizontally(Image image)
Mirrors an Image at its horizontal axis.
This method is Siemens specific.
image
- the image to be mirroredpublic static void mirrorImageVertically(Image image)
Mirrors an Image at its vertical axis.
This method is Siemens specific.
image
- the image to be mirroredprotected static void setNativeImage(Image img, Image simg)
public static Image getNativeImage(Image img)
|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Generated on 2003-10-17 | For further information and updates, please visit Siemens mobile Developer Portal |