catchthecows / AndroidImageMap

An HTML map like widget in an Android view
199 stars 74 forks source link

Zoom and scroll #14

Open Brionne opened 10 years ago

Brionne commented 10 years ago

Your project is good but the zoom quality is disappointing. Look at this librairie to improve your's. https://github.com/ncornette/ZoomableView (Sorry for my english, i'm french...)

catchthecows commented 10 years ago

I have never really been happy with the image zooming (pinch zoom) in this project.

I don't think that simply using ScaleAnimation will help the quality of the zoom image. Maybe I am missing something in the ZoomableView code.

Without resampling the bitmap a lot of information is lost when zooming or shrinking. This is why I prefer to go back to the original bitmap when changing size.

What this could be used for is to show interpolated images between the staring size and the final zoom size. One could argue that the quality of the image while it is zooming is not important, and that simply resampling the bitmap at the final size is all that needs to be done. In other words, during the zoom or move, don't worry about the image quality.

What I eventually settled on for future projects is to use openGL to render the image instead of drawing Bitmaps on Canvas. Although in theory hardware assist for Canvas rendering should be similar speed, I personally found openGL to have better performance on a wider selection of devices.

If you do integrate ImageMap and ZoomableView I'd be interested to see the results.