views:

100

answers:

0

PHPThumb provides two great variables setting the output maximum width and height BUT "This is always overridden by ?w=_ GETstring parameter"

$PHPTHUMB_CONFIG['output_maxwidth'] = 720;
$PHPTHUMB_CONFIG['output_maxheight'] = 720;

You can also set defaults, and for landscape/portrait:

$PHPTHUMB_DEFAULTS['w']    = 720;
$PHPTHUMB_DEFAULTS['h']    = 720;
$PHPTHUMB_DEFAULTS['hp']    =  720;
$PHPTHUMB_DEFAULTS['wl']    =  720;

You can set the getsringoverride to enforce the default width/height but then you can't have width/height smaller than the default.

$PHPTHUMB_DEFAULTS_GETSTRINGOVERRIDE = false;

There doesn't seem to be a way to allow the get paramaters to be used but if entering a value higher than the output_maxwidth/height it outputs that size, not the maximum.

How can the output be explicitly restricted to a maximum size, hence protecting the source images?