【发布时间】:2015-09-03 19:07:45
【问题描述】:
我想从数据库中获取image 并在gallery 或其他可以显示image 的应用程序中显示。如何为那个image设置uri??
我从数据库中得到这样的图像:
public Bitmap retrive(String table,String noeDastor,int row){
Cursor cur=mydb.rawQuery("SELECT * FROM "+table+" where noeDastor= '"+noeDastor+"'", null);
cur.moveToPosition(row);
photo=cur.getBlob(5);
ByteArrayInputStream imageStream = new ByteArrayInputStream(photo);
Bitmap theImage= BitmapFactory.decodeStream(imageStream);
return theImage;
}
我想在电话的gallery 中显示Image...
【问题讨论】:
-
有没有试过的输出代码?
标签: android database image uri gallery