大的圖像,我試圖從URL加載一個大型高分辨率(3225x4800)圖像到滑翔的報業公司。我想加載的圖像是High Res Image。安卓:滑翔沒有顯示從URL
String url = "http://www.businessweekmindanao.com/content/wp-content/uploads/2015/10/fitness-and-wellness-poster-final.jpg";
Glide.with(getActivity()).load(url).asBitmap().into(new SimpleTarget<Bitmap>() {
@Override
public void onResourceReady(Bitmap resource, GlideAnimation<? super Bitmap> glideAnimation) {
imageView.setImageBitmap(resource);
}
});
我使用的是邁克·奧爾蒂斯」 TouchImageView從這裏所提供的解決方案:https://github.com/MikeOrtiz/TouchImageView/issues/135從URL時加載的資源。但它似乎只適用於小分辨率的圖像,並且不會加載高質量的圖像。
有一種替代解決方案,我從計算器嘗試:Android: not displayed ImageView with UIL and TouchImageView,其試圖修改麥克的庫的onMeasure()方法。它適用於:
Glide.with(getActivity()).load(url)
.into(imageViewPreview);
的問題是它加載在非常低的分辨率的圖像。
有沒有一種方式來加載像高分辨率圖像:7480x3740例如利用滑翔TouchImageView?我怎麼做?
請計算有多少字節,這將是在內存:7480x3740x4 – greenapps
請文章的網址以這樣的方式,我們可以點擊鏈接查看的圖片。 – greenapps
@greenapps感謝您的評論。該鏈接位於字符串變量中:http://www.businessweekmindanao.com/content/wp-content/uploads/2015/10/fitness-and-wellness-poster-final.jpg – OBL