Android pinch zoom large image, memory efficient without losing detail

后端 未结 2 1286
夕颜
夕颜 2021-02-08 08:58

My app has to display a number of high resolution images (about 1900*2200 px), support pinch zoom. To avoid Out of memory error I plan to decode image to show full screen by usi

2条回答
  •  独厮守ぢ
    2021-02-08 09:24

    Sorry to answer an old question, but I've just completed an image view that shows an image from assets or external storage with subsampling, and loads higher resolution tiles from the image as you pinch to zoom in. As high resolution image data for areas of the screen is not loaded it should avoid out of memory exceptions.

    https://github.com/davemorrissey/subsampling-scale-image-view

提交回复
热议问题