|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.marre.sms.nokia.OtaBitmap
Nokia OTA Bitmap format
This class can currently only handle non-animated B/W OTA Bitmaps.
Format is:
Octet 1 -> 0 : Not sure what this is Octet 2 -> <width> : Width of image Octet 3 -> <height> : Height of image Octet 4 -> 1 : Number of colors?? B/W == 1? Octet 5-n -> <imgdata> : Image data 1 bit for each pixelI have only verified this class with BufferedImages of type TYPE_INT_ARGB
Constructor Summary | |
OtaBitmap(java.awt.image.BufferedImage theImg)
Creates an OtaBitmap object from an BufferedImage. |
|
OtaBitmap(byte[] otaBitmap)
Initialise with a raw Ota Bitmap |
Method Summary | |
byte[] |
getBytes()
Returns the encoded OtaBitmap |
int |
getHeight()
|
byte[] |
getImageData()
Returns the created image data (not including image header) |
int |
getWidth()
|
void |
setHeight(int i)
|
void |
setWidth(int i)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OtaBitmap(byte[] otaBitmap)
otaBitmap
- public OtaBitmap(java.awt.image.BufferedImage theImg)
Every pixel that is not white will be converted to black.
theImg
- Image to convert.Method Detail |
public byte[] getImageData()
public byte[] getBytes()
public int getHeight()
public int getWidth()
public void setHeight(int i)
i
- public void setWidth(int i)
i
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |