Search code examples
androidandroid-gallerypinchzoomzooming

implement pinch zoom like gallery in android


I have done too much R&D on pinch zoom and found lots of example of pinch zoom for android..

How pinch zoom image in image zoom android?

android pinch zoom

But when I tried to zoom big images (ex: >10 MB, 12200x8521) then It failed to decode. But built in gallery can do and it can zoom. not even zoom but after zoom it display very clean image. While in above pichZoomView can not zoom like this..

I found QuickPic app which is having same zoom feature like gallery. I don't know how this products decode images and zoom like system gallery app.

If I decode full image then it throws OutOfMemoryException and If I decode using sampling then it makes blurred image when I zoom.

I have invested lots of time to get source code of gallery app but still I am unable to find actual gallery zoom implementation from source.Any one has solution? Or gallery source code for pinch zoom implementation.


Solution

  • I have invested lots of my time and got solution from here subsampling-scale-image-view.