开发者

Converting String as a Bitmap in android

I am w开发者_运维问答orking on an application which transfers the image from one device to another device via bluetooth. Now my problem is, I am transfering the bitmap value as byte[] through bluetooth. Now how to resolve it again into bitmap...

Thanks in advance...


Use the BitmapFactory.decodeByteArray() method.

byte[] byteArray; // the data
int offset = 0; // offset into array
int length = 1024; // length of array
Bitmap bm = BitmapFactory.decodeByteArray(byteArray, offset, length);

I think for This string should be Base64 Format. Have a look on this Link for More Info


using the BitmapFactory you can convert the image

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜