Zoom Image and store the visible Image - iphone

I am working on module where I need to perform following activities.
Select image from Library.
Show that image.
Zoom that image.
Save the Zoomed portion or visible portion on the view.so that final image will get saved with zoomed.
I have covered 1,2,3 and struggling with 4
Does anyone have idea about this?
Thanks,
Sagar

If I understand you correctly, you want to save image that appears on the screen after zooming? To do that you can use CGImageCreateWithImageInRect function.

Related

Swift how to show only part of image?

I have got an image 300px300px, but i only want to show 100x100 of it, just like here https://www.pinterest.com/pin/31103053652400980/ background photo is only showing part of it.How can i do that?
You can use UIImageView that has property Clip To Bounds on. After that you can change Content Mode of the `UIImageView' that suits you.
Example:

How can clearly show image in Matlab?

I want show large image in Matlab gui, but when show my image not clearly and not possible for read. for example show my image in Matlab in follow.
Any way show my image like this image?
I know can use zoom in and zoom out, but image in first should clearly.
You can use InitialMagnification to preview the image at your native resolution. If your concern is getting a nice looking zoomed-out image, you can try using reduce parameter of imshow to sub sample it.

How to get co-ordinates of an image while zooming in iphone

I am working on a image displaying project.
The aim is to display the images that is fetched from the server.
We have to fetch different images while user zoom that images.
so I need to get the co ordinates of images while zooming and then that co ordinates have to passed to server and corresponding images have to be fetched from server.
So how can i get different cordinates of image while zooming and pass that cordinates.
Can anyone please help me with this.
Thanks in advance.
Hoping for your help.
Have you tried using the bounds of your image?
As you zoom in to a view the frame stays the same, but the bounds of the image changes. Try logging the bounds as you zoom and you'll see what I mean.
There is a difference between the frame and the bounds of the view.

What class is used in this iphone app

I've been long time searching for a way to achieve placing pins on an image just like the mapview, but have not been able to do this yet. I thought someone could give a clue as what kind of class is used in this picture.As you can see everything is like MKMapView with Annotation pins and callout except for that it's not a map but an ordinary image. How can I achive the same thing?
Yeah, basically a matter of creating the pin image, then placing image views of that image over your background image. Create the image view, set it's position as needed, and call addSubview from the background image.
You can try a simple way, first find out the position of the user tap on the image or screen. Then place that pin image on that tap position in such a manner the height of the pin image should point the y axis of the tap. If you want to store that data then store it in some array or file and you can also save that image (the map containing pins) as png.

How to display particular pixels of an image in imageview in iPhone

I am in a situation in which I need to display particular pixels of an Image in an ImageView.
Is there any way to do this in iPhone?Can anybody provide some Example code to do this?Please help me to solve this problem.
There are many ways to display a small subset of your pixels. You can get the raw pixels with this.
Or you can crop a photo. Or you can mask a photo so you are left with just a small bit of your image.
What exactly do you mean by "display particular pixels"?