Search This Blog

Friday, 1 June 2012

How to convert byte array into image in blackberry development

Hello friends,
                   As in my previous post i showed you how to get an image by integrating camera in your app,you were getting that image in byte array, now here is the code to convert it into Bitmap....follow the code

Suppose you have a byte array _rawImage....

EncodedImage hai = EncodedImage.createEncodedImage(_rawImage, 0, _rawImage.length);

now simply ,create a Bitmap object and use getBitmap function of EncodedImage class...

Bitmap _finalImage = hai.getBitmap();

No comments:

Post a Comment