HI - This may seem like an odd request, but I would like to be able to adjust the size of the resolution for the fullsize image from the original resolution (i.e. 1600 x 1200) to a resolution that I manually specify in the displayimage.php script (i.e. 1024 x 768).
For instanace, if my orgininal image is stored on the server at 1600 x 1200, I would like to have the resolution for the fullsize image that is displayed on the screen (after the intermediate picture) to 1024 x 768. I would still like to keep the intermediate picture size at defined in the admin configuration setting and the orginal file size must remain intact at the original file size / resolution. So, I don't want to reduce the image resolution / size on the server to accomplish this.
Please let me know if you can point me in the right direction to make this happen.
I hope this make sense.
Thanks in advance.
-Jerry M.
The request doesn't make sense to me. Why force a visitor to see 1024x768 when the image is actually 1600x1200? Why not just upload a 1024x768 image?
Even though I don't see the point, I think this code will do what you want.
In displayimage.php, find
$geom = 'width="' . $row['pwidth'] . '" height="' . $row['pheight'] . '"';
replace with
if (max($row['pwidth'], $row['pheight']) > 1024)
{
$xh = 1024 / max($row['pwidth'], $row['pheight']);
} else {
$xh = 1;
}
$geom = 'width="' . ($row['pwidth'] * $xh) . '" height="' . ($row['pheight'] * $xh) . '"';
Just change 1024 to whatever number you want. This code should resize both the width and height according to the proper ratio.
This worked perfectly! Thanks for the quick response!