Reply to Re: If width larger, resize x or if height larger resize y

Re: If width larger, resize x or if height larger resize y new!
by colin, 14 years, 10 months ago
You can read image_src_x and image_src_y before calling process(), and act accordingly. For instance:
if ( $handle->image_src_x > 1000 ) {
    $handle->image_x = 1000;
    $handle->image_ratio_y = true;
} else {
    $handle->image_y = 300;
    $handle->image_ratio_x = true;
}  
$handle->process(...);
Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important