Click to See Complete Forum and Search --> : thumbnail pictures


esthera
11-01-2005, 10:08 AM
if I have a picture on my server -- is there anyway for me to display it as a thumnail -- say alway 100 px wide but the height proportional?

buntine
11-01-2005, 07:14 PM
You can use ASPJpeg (or a similar component) to dynamically resize the image. See www.aspjpeg.com

From there, it is simply a matter of displaying the image with the appropriate HTML element (<img>). Setting the width and height properties with explicit pixel values will force the image to display at a particular size.

Regards.

esthera
11-01-2005, 11:09 PM
i can't use aspjpeg as it's not installed on teh server.

any other ways? without installing a component.

buntine
11-01-2005, 11:26 PM
It will be very cumbersome without a component. I am fairly sure VBScript does not have the functionality in-built. Only ActiveX components, etc can perform image manipulation dynamically (as far as I know).

See: http://www.sitescripts.com/ASP/Image_Manipulation/

Regards.

esthera
11-01-2005, 11:35 PM
is there no way to do it with the image? meaning get the sizes and make the height and width proportionate (say always with a 100 as a width and then just show the img with the correct height and width? (without actaully resizing?)

Bullschmidt
11-02-2005, 12:03 AM
Maybe this will give you some ideas:

Proportional Image Resizing within a Constrained Area by Mike Shaffer
http://www.4guysfromrolla.com/webtech/011201-1.shtml

esthera
11-02-2005, 01:18 AM
this look like just what i need but not working 100% -- have you used it before?
it seems to be setting a width but not a height.

Bullschmidt
11-02-2005, 01:23 AM
No I haven't actually used it.

Giskard
11-04-2005, 01:25 PM
If you're not going to be displaying alot of images you can just give the image a width of 100 and leave the height alone.

<img src="image.gif" width="100">

The full size image will be downloaded so it may make the page run a little slow but it should work.

I know this will work for most browsers, but I haven't tested them all, so that may be a problem.

Bullschmidt
11-04-2005, 02:36 PM
Good point as the following all keep the same image proportions no matter what the original size of the image (tested in IE 6 and Firefox 1):

<img src="myimage.jpg" height="50%">
<img src="myimage.jpg" width="50%">
<img src="myimage.jpg" height="100">
<img src="myimage.jpg" width="100">

lmf232s
11-04-2005, 03:39 PM
I agree i would just use the
<img src="?" width="100px" height="100px">

But the only problem with this is this.
What if the image above in question is from say my digital camera and its a 4.1 meg file. No matter what size i decide to show that image on my screen, its still going to have to load that bad boy. Now that image size is alittle unnatural to be displaying anyways but you see my point.

Why not just create a second image.
Img01_sm.jpg
Img01_lg.jpg

There are pleanty of programs out there that will take the original pic and create a thumbnail out of it so you can pull this off.

goofy1989
11-05-2005, 01:14 PM
I don't know if this is exactly what you want, but I was using this for a little while....

<img src="......" width="100" height="*">