View Single Post
Old 09-06-2007, 07:29 AM   #4
arifzaman
Thumbs Must Hurt
 
Join Date: Jun 2007
Location: Bangladesh
Model: 8800
PIN: N/A
Carrier: EDGE
Posts: 93
Default

Hi simon.hain,

Quote:
Originally Posted by simon.hain View Post
EncodedImage reads:
To decode an image, first call EncodedImage.createEncodedImage to generate an instance of EncodedImage, and then call getBitmap.

createEncodedImage wants a byte-array - which i don't have.
Here is a sample code:
Code:
// Creates an EncodedImage from provided name resource
EncodedImage image = EncodedImage.getEncodedImageResource("logo.bmp");
// Returns a byte array containing the encoded data for this EncodedImage
byte[] array = image.getData();
// Decodes the image represented by this EncodedImage and returns a Bitmap
Bitmap LOGO_BMP = image.getBitmap();
Cheers,
ARIF
Offline   Reply With Quote