|
|||||||||
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.GIFEncodedImage
public final class GIFEncodedImage
Represents an image encoded in the GIF format.
To create a GIFEncodedImage
instance, use
EncodedImage.createEncodedImage(byte[],int,int)
, which 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.
Field Summary | ||
---|---|---|
static int |
TRANSITION_COMBINE
Represents the frame transition, combine. |
|
static int |
TRANSITION_DEFAULT
Represents the default transition. |
|
static int |
TRANSITION_REPLACE
Represents the frame transition, replace. |
|
static int |
TRANSITION_RESTORE_TO_PREVIOUS
Represents the frame transition, restore to previous. |
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 | ||
---|---|---|
int |
getBackgroundColor()
Retrieves an image's background color. |
|
int |
getBitmapType(int frameIndex)
Retrieves bitmap type of a frame by index. |
|
int |
getFrameDelay(int frameIndex)
Retrieves the frame delay for a frame by index. |
|
int |
getFrameLeft(int frameIndex)
Retrieves left edge of frame by index. |
|
int |
getFrameNumColors(int frameIndex)
Retrieves the number of unique colors in a frame by index. |
|
int |
getFrameTop(int frameIndex)
Retrieves top edge of frame by index. |
|
int |
getFrameTransition(int frameIndex)
Retrieves the frame transition time by index. |
|
int |
getIterations()
Retrieves the number of iterations specified for an animation. |
|
String |
getMIMEType()
Return the commonly known MIME type associate for this encoded image object. |
|
int |
getScaledFrameLeft(int frameIndex)
Retrieves left edge of scaled frame by index. |
|
int |
getScaledFrameTop(int frameIndex)
Retrieves top edge of scaled frame by index. |
|
boolean |
isBackgroundTransparent()
Determines if this image has a transparent background. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TRANSITION_DEFAULT
public static final int TRANSITION_COMBINE
public static final int TRANSITION_REPLACE
public static final int TRANSITION_RESTORE_TO_PREVIOUS
Method Detail |
---|
public int getBackgroundColor()
public int getIterations()
public int getFrameLeft(int frameIndex)
frameIndex
- Index of frame for which to retrieve the left edge.
public int getFrameTop(int frameIndex)
frameIndex
- Index of frame for which to retrieve the top edge.
public int getScaledFrameLeft(int frameIndex)
Use this method to retrieve the left edge of a frame, if this image is scaled.
frameIndex
- Index of frame for which to retrieve the left edge.
public int getScaledFrameTop(int frameIndex)
Use this method to retrieve the top edge of a frame, if this image is scaled.
frameIndex
- Index of frame for which to retrieve the top edge.
public int getFrameDelay(int frameIndex)
Use this method to retrieve the delay (that is, "onscreen display time") for a frame by index in 100ths of a second.
frameIndex
- Index of frame for which to retrieve the delay.
public int getFrameTransition(int frameIndex)
Use this method to retrieve the transition time (the time to elapse after displaying this frame, before moving to the next frame).
frameIndex
- Index of frame for which to retrieve the transition
time.
public int getFrameNumColors(int frameIndex)
frameIndex
- Index of frame for which to retrieve the number of
unique contained colors.
public boolean isBackgroundTransparent()
public int getBitmapType(int frameIndex)
getBitmapType
in class EncodedImage
frameIndex
- Index of frame to examine.
Bitmap
public String getMIMEType()
getMIMEType
in class EncodedImage
String
representing the MIME type generally associated with this object.
|
|||||||||
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