LoginSignup
1
0

More than 5 years have passed since last update.

AndroidのImageViewに大きなBitmapをセットしようとしてBitmap too large to be uploaded into a texture

Posted at

Android開発で、大きなBitMapをImageViewにセットしようとしたところ、以下のようなエラーが出て画像が表示されなかった。

Bitmap too large to be uploaded into a texture (3120x4160, max=4096x4096)

ImageViewに読み込む際に、ライブラリを通してやれば出来そうだったので、glideを使って無事解決。

  • 変更前
imageView.setImageBitmap(bitmap);
  • 変更後
Glide.with(getContext()).load(bitmap).into(imageView);

おまけ

AndroidのImage読み込みライブラリでメジャーなGlideとPicassoを簡単に比較
今回はリリースがより頻繁にされているglideを採用

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0