Android : Maximum allowed width & height of bitmap

前端 未结 5 1947
广开言路
广开言路 2020-11-27 04:37

Im creating an app that needs to decode large images to bitmaps to be displayed in a ImageView.

If i just try to decode them straight to a bitmap i get the following

5条回答
  •  情书的邮戳
    2020-11-27 05:29

    The 2048*2048 limit is for GN. GN is a xhdpi device and perhaps you put the image in the wrong density bucket. I moved a 720*1280 image from drawable to drawable-xhdpi and it worked.

    Thanks for the answer by Romain Guy. Here's the link of his answer.

提交回复
热议问题