Glide不想加载正确尺寸的图像

时间:2016-07-11 08:39:22

标签: android memory bitmap android-glide

我尝试加载一个带有滑动的大图像(671kb和1.17Mb)(Util.loadImage只包含一些普通的Glide方法):

private void invalidateImage() {
if (mImage != null) {
  Util.loadImage(mHolder.root.getContext(), mImage)
      .asBitmap()
      .into(new SimpleTarget<Bitmap>() {
        @Override
        public void onResourceReady(final Bitmap resource, final GlideAnimation<? super Bitmap> glideAnimation) {
          setImageSource(ImageSource.bitmap(resource));
        }
      });
}

}

Bitmap resource取决于设备。如果我在像三星SM-N900这样的酷设备中运行app,资源就可以了,资源是一个正确的宽度和高度值的位图:

enter image description here

如果我在像Senseit E400这样的弱设备中运行app,Bitmap resource会将其比例更改为不正确的值:

enter image description here

我无法理解,是什么阻止Glide正确加载图像。有什么想法吗?

0 个答案:

没有答案
相关问题