我使用Picasso库和Parse.com作为我的应用程序 我通过解析文档将图像下载到字节数组中。
如何用毕加索将其展示到imageview中? Picasso在load()中不接受Byte。
file.getDataInBackground(new GetDataCallback() {
@Override
public void done(byte[] data, ParseException e) {
if (e == null) {
Picasso.with(this)
.load(data)
.into(wallpaper);
} else {
}
}
}
由于
答案 0 :(得分:0)
为什么不用Picasso本身下载图像?您可以在.load(URL)
中传递该网址,然后下载并显示给您。
或者您可以将byte[]
转换为Bitmap
,然后将其传递给.load(Bitmap)
。