Baseflow / PhotoView

Implementation of ImageView for Android that supports zooming, by various touch gestures.
https://baseflow.com
Apache License 2.0
18.77k stars 3.92k forks source link

images are displayed without resizing #814

Open sunshinelwj opened 2 years ago

sunshinelwj commented 2 years ago

🏗 Enhancement Proposal

I noticed that in the following code in PhotoView, images are displayed directly without resizing: com.github.chrisbanes.photoview.PhotoView.java setImageURI() (line 122) https://github.com/Baseflow/PhotoView/blob/master/photoview/src/main/java/com/github/chrisbanes/photoview/PhotoView.java#L121

For the images to be displayed, in many cases, they are larger than required. Because the bitmap display in an app is memory consumption, maybe we should resize the images before decoding them, which can reduce memory overhead and help make app more smooth in user interaction.

Thanks.