first of all, thank you for your patience.
my problem with using your example code is that i can't provide my bitmap as a resource. I read it from an external source, like
Bitmap bmp = getBitmap();
now i get the error:
cannot find symbol
symbol : method getEncodedImageResource(net.rim.device.api.system. Bitmap)
is there a way i can provide my new bitmap as a named resource?
Quote:
Originally Posted by arifzaman
Hi simon.hain,
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
|