in reply to HTML image resizing with Image::Info based on max height/width
I know how to determine height and width with Image::Info but I need to know how I can HTML resize (yes, just HTML. I know it'll load the whole image anyway but it'll fit better)Well, if you plan to send the entire high-resolution picture to the web browser anyway then there is no need to resize at all. :-)
Just send either the maximum allowed height or the maximum width along with the image to the browser and the browser will calculate the other length such that the image is shown/resized proportionally.
Note: Even though the above will work, you can save the network and the web client a lot of bandwidth and cpu cycles if you properly resize the picture server side and just transport a downsized picture over the network.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: HTML image resizing with Image::Info based on max height/width
by Anonymous Monk on Jun 20, 2007 at 14:24 UTC | |
by Anonymous Monk on May 12, 2008 at 00:58 UTC | |
by Anonymous Monk on May 12, 2008 at 01:39 UTC |