Resize intermediate images to set WIDTH (but not height) Resize intermediate images to set WIDTH (but not height)
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

Resize intermediate images to set WIDTH (but not height)

Started by bitcloud, April 23, 2007, 09:29:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bitcloud

Hi,

I'm trying to work out how to have the intermediate (normal_) images resized to a set width rather than "finding the longest side (width or height) and resizing so that the longest side becomes the max size..."

To perhaps explain better.
I set my intermediate_max_image_size to 200.
If i upload an image which is width=1000 height=500 I get an image which is width=200 height=100.

If the width is greater than the height, this works how I'm after, but if I upload an image now which is width=500 height=1000 I'll end up with an image which is width=100 height=200.

What I want in this instance however, is width=200 height=400 (so the height is greater than the intermediate_max_image_size, but the width for intermediates is ALWAYS the max variable)

I hope I've explained this well enough. I've really tried everything I can think of for this. If anyone can offer any suggestions/pointers, it'd really be appreciated!