Forum Moderators: open

Message Too Old, No Replies

Resizing Images & Keep Proportions on a Webpage

Resizing Images & Keep Proportions on a Webpage

         

rezz7

3:30 am on Jan 17, 2004 (gmt 0)

10+ Year Member



Does anyone know how to resize images from a webpage while keeping its proportions? ASP, VBScripts, JavaScripts, CSS, or plain html codes and scripts are preferred. Any other types of languages are welcome too. Thanks!

willybfriendly

3:37 am on Jan 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



First off, Welcome to Webmaster World...

Your question is too broad. If you are resizing images on the fly, I assume you will be doing it server side. PHP includes a suite of imgage manipulation functions that allow this. I would assume, but don't know, that asp does also.

You could use a JS script, but it would be most inefficient since the image in its raw form would be downloaded and then simply resized to proper proportions. The result would either be a file being downloaded that was far larger than it needs to be, or the potential for some seriously ugly artifacts resuling from a small file being blown up too much.

Where possible, it is better to save an image in the proper size to begin with.

WBF

rezz7

3:48 am on Jan 17, 2004 (gmt 0)

10+ Year Member



Wow, that was a fast reply! And thanks for the welcome, I'll definitely come to this board often!

First off, I'm trying to create a website that allows users to upload images to my server. These images will be displayed on a dynamic webpage but will be resized while keeping its proportions and byte size. When the image is clicked, it will display the image in its original size. It's shrinking the image that I'm not familiar with. Anyone with ASP codes or Javascripts that relate to this matter would be greatly appreciated? Otherwise, I'll do more research. Thanks for the reply!

defanjos

4:11 am on Jan 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I know ASPImage can do what you are looking for.

To upload images, you can use ASPUpload.

Many hosting companies offer these ASP components free of charge.