|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.system.EncodedImage
net.rim.device.api.system.PNGEncodedImage
public final class PNGEncodedImage
Represents an image encoded in the PNG format.
To create a PNGEncodedImage instance, use the
EncodedImage.createEncodedImage(byte[],int,int) method. The
createEncodedImage method accepts a java byte array containing
the encoding of an image.
An image encoding can be obtained by either of the following methods:
First, when an image is added to a project in the IDE, the image resource becomes available to the developer.
Second, the image encoding can be obtained manually by converting the binary image file to a java byte array. This is accomplished using the following procedure:
If done correctly, the file will contain a valid Java byte array containing the image encoding.
JPEGEncodedImage| Field Summary |
|---|
| Fields inherited from class net.rim.device.api.system.EncodedImage |
|---|
DECODE_ALPHA, DECODE_NATIVE, DECODE_NO_DITHER, DECODE_READONLY, IMAGE_TYPE_BMP, IMAGE_TYPE_GIF, IMAGE_TYPE_ICO, IMAGE_TYPE_JPEG, IMAGE_TYPE_PNG, IMAGE_TYPE_TIFF, IMAGE_TYPE_WBMP |
| Method Summary | ||
|---|---|---|
static PNGEncodedImage |
encode(Bitmap bitmap)
Creates a PNGEncodedImage by compressing a Bitmap. |
|
int |
getAlphaBitDepth()
Queries the bit depth of the alpha channel. |
|
int |
getBitDepth()
Queries the PNG bit depth. |
|
int |
getBitmapType(int frameIndex)
Returns the bitmap type. |
|
int |
getColorType()
Queries the PNG color type. |
|
String |
getMIMEType()
Return the commonly known MIME type associate for this encoded image object. |
|
boolean |
hasAlpha()
Queries whether the PNG has an alpha channel. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static PNGEncodedImage encode(Bitmap bitmap)
PNGEncodedImage by compressing a Bitmap.
bitmap - the Bitmap to encode.
PNGEncodedImage object that is the specified bitmap
encoded as a PNG image; never returns null.
NullPointerException - if bitmap is null.public int getAlphaBitDepth()
public int getBitDepth()
public int getBitmapType(int frameIndex)
getBitmapType in class EncodedImageframeIndex - The index of the frame.
getBitmap.public int getColorType()
public String getMIMEType()
getMIMEType in class EncodedImageString representing the MIME type generally associated with this object.public boolean hasAlpha()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal