Changing Fullsize Image Resolution Changing Fullsize Image Resolution
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Changing Fullsize Image Resolution

Started by myjunkman, September 06, 2005, 04:34:38 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

myjunkman

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.

kegobeer

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?
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

kegobeer

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.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

myjunkman

This worked perfectly! Thanks for the quick response!