zoom image

  • Thread starter Thread starter Keith G Hicks
  • Start date Start date
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
 
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)
 
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)
 
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)
 
Back
Top