2014-11-03 16 views
0

我有一个图像的bytearray。我需要使用设备图像浏览器显示图像。用设备映像中的字节数组打开一个图像broswer

我用这个代码以打开其具有URI其工作正常

Intent intent = new Intent(); 
intent.setAction(android.content.Intent.ACTION_VIEW); 
Uri u = Uri.fromFile(destinationFile); 
intent.setDataAndType(u, "image/*"); 
startActivity(intent); 

问题我不具有URI我只具有图像字节阵列的图像。那么,如何可以达致这

请帮我

感谢

+0

我觉得像在您的项目像绘制文件夹 – 2014-11-03 10:03:04

+0

它不是一个图像..它是一个字节数组 – user3607798 2014-11-03 10:05:04

+0

我知道,但像sdcard或drawable资源的字节数组的图像在哪里 – 2014-11-03 10:06:24

回答

0

希望这个代码将帮助您:

Bitmap bmp = BitmapFactory.DecodeByteArray(data, 0, data.Length); 
imageview.SetImageBitmap(bmp); 

来源:conversion of byte array to image

相关问题