How to tile and scroll a large image (10000x10000) in android

前端 未结 4 2063
眼角桃花
眼角桃花 2020-12-08 12:28

I am working in a map project in android. It contains larger image of 10000x10000 resolution. Using this image with Bitmap it gives OutOfMemoryError

4条回答
  •  天命终不由人
    2020-12-08 12:56

    Starting from API level 10, you can use BitmapRegionDecoder to load specific regions from an image without the need of manually generating the tile images. I've recently developed a lib that provides the visualisation of large images with touch gesture handling. The source code and samples are available at https://github.com/diegocarloslima/ByakuGallery

提交回复
热议问题