CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2003
    Posts
    2

    Image Zooming in C#

    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

  2. #2
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    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
    Attached Files Attached Files
    - Software Architect

  3. #3
    Join Date
    Apr 2003
    Posts
    2
    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

  4. #4
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    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
    - Software Architect

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured