Image Zoom, Pan and Sliced images - android

I have a image received from server. I have to provide Zoom and Pan functionality to it.
I also receive set of point of image, when clicked on these point of image i need to show a pop up.
Initially i thought of using default viewer for image but the pop up of click of specific point is out of question.
I cannot slice the image also
Point me to proper direction.

I think this library fulfills your requirements: https://github.com/chrisbanes/PhotoView

Related

Zoom the particular portion of image

I would like to zoom the image to particular portion(user input coordinates) of the image.
When I click on a button I would like to zoom the image to particular coordinates of the image.
Can anyone help me out to find the zoom function?
Use view.setPivot before view.setScale
If you arent targeting API 11+ theres a calculation that took me 4 attempts along of 3 years to make it work, if you need it I can search after.

How to show a map which is a big image?

I got a png image which is 5000x5000. This image is some sort of map. I wanted to display the image in an imageview and this gave me an outOfMemoryException(of course). So i tried to set a sampleSize, but this decreased the resolution which makes the map not very usefull.
So basically I want to show this image and be able to zoom and scroll without resolution loses. What would be the best approach?
I am a fan of Dave Morrissey's SubsamplingScaleImageView, which seems to cover what you want. Quoting the project documentation, it is:
A custom image view for Android, designed for photo galleries and displaying huge images (e.g. maps and building plans) without OutOfMemoryErrors. Includes pinch to zoom, panning, rotation and animation support, and allows easy extension so you can add your own overlays and touch event detection.

Zoomable Imageview or Activity

I have an activity that has just a image to show like graphical help. It has a lots of info and needs to be zoomed. I searched alot in diffrent sites and they say imageview is not zoomable. and i found complicated algoritjhms for it. i want to make my programm to zoom like many usual proggrams that zoom like my 2 fingers get further image zooms in and if they get close zooms out and and i want to user be able to move postion if image in image view bye moving his finger on it.if its impossible can i make that as background and do these functions on whole activity? thanks for helping
This SO thread should have everything you need to implement the pinch zoom. Alternatively you could have a look at the PhotoView library; an implementation of ImageView that supports zooming.

How to get correct imageview coordinates with moveable image

I would like to be able to view a rather large image (floor plan) that can be fully viewed by moving around the picture. When I click on the image, I would also like to get the coordinates on that image.
I've followed this tutorial 1 which works correctly and so allows me to move around the image. After that I also added some functionality to get the position of where I touch the screen. However, when moving around the image, black borders surround it (see picture below), which causes me to get incorrect coordinates.
So would somebody know how I could a) fix/remove the black borders when moving the image or b) correct the coordinates I receive by e.g. removing the border offset?
1 http://www.zdnet.com/blog/burnette/how-to-use-multi-touch-in-android-2-part-2-building-the-touch-example/1763
When you move around the image, set the scroll to stop before it reaches the edges of the image. Use this link for further details.
As for your coordinates, check these other 2 links: link1, link2.
Hope these would help you.

Get actual image coordinates of image in Android webview onTouch event

I'm loading floor plans into an Android application. I need the user to be able to identify problem areas on the floor plan with a single click. My thought process is to identify the click action, reload the html of the webview adding my marker asset to it at the specified location.
I've loaded the image into a webview to take advantage of zoom capabilities. I can get the X,Y coordinates of the webview where the click occurred, but I can't figure out how to get the current zoom level. Also, I'm not sure what math will be required to translate the X,Y,scale to actual pixel coordinates.
Is the webview the right view for me to use?
EDIT:
Using the link suggested below, I got the zoom functionality working. I still can't figure out how to place a drawable marker on top of the TouchImageView, much less get the coordinates that were actually touched on the image.
For your zoom question as well as coor, How can I get zoom functionality for images? should help you
The accepted answer does use a WebView, but the other answer uses a better approach for enabling zoom. It also provides the necessary math required for translating your X and Y coordinates into usable points.

Categories

Resources