Groups | Blog | Home
all groups > dotnet drawing api > september 2007 >

dotnet drawing api : Recommendations for component(s) to zoom in on JPG images on form



BobRoyAce
9/18/2007 8:06:01 PM
I have an application that allows users to view JPG images that were
previously scanned. In one part of the application, the users are wanting to
view an image such that they can zoom in on a particular section of the JPG
so as to interrogate address information contained therein. I was just
showing the images using an Image control, and, when the user double-clicked
on the the image, I would just open up the image in whatever default
application was specified on the PC to open up JPGs. Then, from there, they
could zoom in as they wished. This solution is not efficient and I need to
come up with something more elegant. Soooo...

What I want to do is use some other control (third-party I'm imagining) on
the image viewing form such that users could zoom in and out on sections of
the images to their hearts content without opening the image up in some other
application. Any recommendations as to how I could accomplish this using a
standard image control? Alternatively, could you suggest any third party
controls that would allow this? Ideally, I would like the users to be able to
do things like:
1) zoom in/out by certain % (e.g. 50%, 100%, 200%, fit width, fit height,
fit page, etc.)
2) click and drag to select an area of the image to zoom in on
3) change mouse to magnifying glass such that whatever area is centered
under mouse cursor (with certain specified dimensions) would be magnified to
some magnification level (e.g. 200%) which is user settable
4) use the mousewheel to zoom in/out by certain % increments (e.g. each
click up increases zoom level by 25%), zooming in on whatever part of the
image is currently under the mouse cursor if relevant.

Lastly, and this would be really cool, I'd love it if I could allow a user
to select an image (say, in a list of filenames), and then have two images
that would show on the form, each one a zoomed in version of a portion of the
selected image. All of the images I'm dealing with are scans of identical
forms that were filled in by hand and should, for the most part be the same
size and shape. The address information that the users need to interrogate is
always in the same two areas of these forms. A solution (probably a component
collection) that could accomplish this, as well as above, would be way cool.

Michael C
9/19/2007 12:00:00 AM
[quoted text, click to view]

You could do all this without third party controls using the build in
drawing functions. Stuff like the magnifying glass can get pretty
complicated. I've got most of the functionality within my app but can't give
it away for free :-)

BobRoyAce
9/19/2007 7:42:01 AM
I figured that all of it could be done within code. That is, after all, how
the off-the-shelf components would do it. However, at this point, i't most
likely a less expensive option to buy off-the-shelf than "recreate the
wheel". Any recommendations for good, reputable, third party controls that
Bob Powell [MVP]
9/19/2007 7:36:25 PM
Zoompicbox
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.





[quoted text, click to view]
AddThis Social Bookmark Button