zoom image

K

Keith G Hicks

In MS Access image controls there's a property setting for "Size Mode" -->
Clip, Zoom or Stretch. I don't see any similar property in an asp image
control. When I have an image on a page, it seems to Stretch no matter what.
If an image is displayed that has different proportions than the image
control itself, the image is distorted. I need a "Zoom" setting (not to zoom
in and out). How can this be done?

Thanks,

Keith
 
B

bruce barker \(sqlwork.com\)

the img control in .net, just generates an image tag. all display features
are done by the browser. there are CSS styles for sizing and clipping. your
code will have to get the image size and clac the zoom and clip you want.

the most common approach is an aspx page that display the image the correct
size by doing transformation on the server rather than the client.

-- bruce (sqlwork.com)
 
K

Keith G Hicks

ok. Thanks for the info. I found this:
http://www.codeproject.com/csharp/imageresize.asp Seems like that would do
the trick.

in message the img control in .net, just generates an image tag. all display features
are done by the browser. there are CSS styles for sizing and clipping. your
code will have to get the image size and clac the zoom and clip you want.

the most common approach is an aspx page that display the image the correct
size by doing transformation on the server rather than the client.

-- bruce (sqlwork.com)
 
B

bruce barker \(sqlwork.com\)

the browser only supports setting the size and width of an image, then it
scales it to the new size. if you want a proportional resize, then calc
proportional sizes. you can use the drawng namespace to load an image and
get its size, so you can recalc. IE has a non-compliant zoom style you can
use also.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top