ASP Image Control

S

Samuel

Hi

I use the image controls to show images but it distorts the image if the
image dimensions are different to the image itself

Thank you,
Samuel
 
C

Cowboy \(Gregory A. Beamer\)

That is normal. When you change pixel size, the image has to be interpolated
in the browser.

There are technologies, like deep zoom, that allow zooming in and out
without degredation, but they require multiple images to do this.
 
S

Samuel

So what does everyone do when they have to show images of different
proportional dimensions
 
H

Hans Kesting

Samuel submitted this idea :
So what does everyone do when they have to show images of different
proportional dimensions

A few ways:

* Do NOT specify height and width - leave it to the browser to display
the full image in the correct dimensions.

* Change the image server-side so you can proportionately rescale it.
Then you can have both a (calculated) thumbnail and the full-size
image.

* Calculate a width so it is in proportion to your height for this
particular image and let the browser rescale the image (or calculate
height from width). That means a lot of work for the browser: download
the full (possibly large) image, and then rescale it to display a
thumbnail)

Hans Kesting
 
S

Samuel

Thank you


Hans Kesting said:
Samuel submitted this idea :

A few ways:

* Do NOT specify height and width - leave it to the browser to display the
full image in the correct dimensions.

* Change the image server-side so you can proportionately rescale it. Then
you can have both a (calculated) thumbnail and the full-size image.

* Calculate a width so it is in proportion to your height for this
particular image and let the browser rescale the image (or calculate
height from width). That means a lot of work for the browser: download the
full (possibly large) image, and then rescale it to display a thumbnail)

Hans Kesting
 
C

Cowboy \(Gregory A. Beamer\)

One thing you can do is to get the dimensions as you show the image and
adjust the image tag accordingly. This means you need enough space for the
largest image.

If you do not want to query the image every time, you can store it when the
image is uploaded.
 

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

Forum statistics

Threads
474,167
Messages
2,570,910
Members
47,453
Latest member
MadelinePh

Latest Threads

Top