Click to See Complete Forum and Search --> : Image Zooming in C#


ram_sac
April 14th, 2003, 03:51 AM
I want to zoom a selected portion of an image. i.e after an image is loaded into a form or a picture box, the user chooses a particular region and then the image will be zoomed and the selected region will be in the initial focus

Approach: I tried out the followin approach.
I zoomed the entire image and move the horizontal and the vertical scrollbar to the start of the zoomed region.

The problem is: The selected region thats captured corresponds to the original bitmap, but when the image is zoomed the coordinates changes. So is there any way that i can find out the coordinates of the clicked part in the zoomed image.

Any other approach to this problem is also highly appreciated

pareshgh
April 14th, 2003, 11:10 AM
hi,

I remember one of the guy on this board was working for zoom stuff for quiet a bit long. you can search this forum with zoom. I am sending you his project. it might help you.

note attached is the ColorChanger.zip
which accepts .bmp file and has a zoom effect.

hope this will help you,

thankx
Paresh

ram_sac
April 15th, 2003, 01:56 AM
hi

thanx for the reply. I went through the code that u sent. The app actually zooms the entire image and shows. ok thats fine. but what i want is after zooming the image, the viewport should show the area that the user selected to zoom. How do i do that

pareshgh
April 16th, 2003, 12:16 PM
actually there are zooming factors,
like ratios and factors and other parameters,
you will need to show the parameters, zooming percentage in some UI form.

as the parameters changes you need to render it.

this is just the approach,

-Paresh