Forum Moderators: open

Message Too Old, No Replies

Resizing images of random sizes

how to adjust on the fly

         

too much information

6:09 pm on Jul 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a site where people can display their own images, and the problem comes in when I display a selection of 'thumbnails' of their images for their visitors. Everything is fine in IE and Netscape, but when you go to Safari and some other browsers the images appear stretched when I force the resize.

Is there a way to determine the size (in pixels) of the image on the fly so that I can calculate an accurate height and width?

(I'm using VBScript and ASP for the site)

hakre

11:13 am on Jul 23, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



hi 'too much information',

if the pictures are a standard jpeg, you can use visual basics stdpicture-type. that should do the job. this object has properties for width and height.

take a look at loadpicture, too.

too much information

12:26 pm on Jul 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for the tip. That should help, after I finally get some time to experiment, although what I have read so far looks promising.