Decode a part of Bitmap from file in Android

后端 未结 6 1347
广开言路
广开言路 2020-12-17 01:40

I have a file with a very large image: for example 9000x9000.

I can\'t load the Bitmap in memory because the heap size. But I only need to display a small part of th

6条回答
  •  Happy的楠姐
    2020-12-17 02:24

    is it possible that there is a solution for this?

    for example , BitmapRegionDecoder .

    It should work for API10 and above...

    Usage:

    BitmapRegionDecoder.newInstance(...).decodeRegion(...)
    

提交回复
热议问题