tylerjca
04-03-2006, 09:09 PM
Hi,
I'm trying to set something up so that when someone uses a display picture that is already uploaded to the server, it resizes the image to either 100px wide OR 100px high, depending on whether the image is wider than it is high, or higher than it is wide...in other words:
<?php
//somehow get height and width before the following..
if($image_height>$image_width)
{
$sizes = "height=\"100\"";
}
else
{
$sizes = "width=\"100\"";
}
?>
<img src="/displays/my_file/image01.jpg" <?=$sizes;?> alt="My Display Pic">
Is this possible? or am I going to have to use Javascript for this?
I'm trying to set something up so that when someone uses a display picture that is already uploaded to the server, it resizes the image to either 100px wide OR 100px high, depending on whether the image is wider than it is high, or higher than it is wide...in other words:
<?php
//somehow get height and width before the following..
if($image_height>$image_width)
{
$sizes = "height=\"100\"";
}
else
{
$sizes = "width=\"100\"";
}
?>
<img src="/displays/my_file/image01.jpg" <?=$sizes;?> alt="My Display Pic">
Is this possible? or am I going to have to use Javascript for this?