--- whoisquilty <[EMAIL PROTECTED]> wrote:

> I want to create a thumbnail image. But I don't want to physically resize
> each image before 
> uploading it (actually, my client doesn't really have the capability).
> 
> Can I dictate a height (i.e. 108 px) and have a PHP script that will
> proportionately size down 
> the image using that height? So, if the original is 360 px wide by 540 px
> high, the image will 
> automatically size to 108 px high by 72 px wide.
> 
> How would I do this?

If I am interpreting your description, you don't want to make smaller thumbnail
image files bo be stored on the server.  You simply want to display the images
at a smaller size.

While you could dynamically change the size each time the image was displayed,
this would cause your server to do a lot of work.  Surely processing power is
more expensive than disk space.

Instead, if the images are small enough to be quick to load, you could use HTML
and simply define one dimension as the desired size.  If the other dimension is
undefined, it will be proportionally smaller, keeping the aspect ratio.

<img height='108' src='image.jpg'>

Now the browser is required to scale the image.  Some browsers and some OSs do
a better job of this than others.

James

Reply via email to