If width larger, resize x or if height larger resize y

See all posts See thread Reply

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
Re: If width larger, resize x or if height larger resize y new!
by Darteye, 12 years ago
ten przykład też się przyda thx ...ale jest problem
a wiesz jak wyliczyć stosunek proporcji?
zdjęcie może być 3500x2300 i nie jest panorama
lub 4500x1080 i wtedy jestReply
Re: If width larger, resize x or if height larger resize y new!
by Darteye, 12 years ago
This example also be useful thx ... but the problem is
and you know how to calculate the ratio of proportion?
Stock Image can be 3500x2300, and is not panorama
or 4500x1080 and then it isReply
Re: If width larger, resize x or if height larger resize y new!
by Darteye, 12 years ago
sorry

I gave: $ handle-> image_y
instead of: $ handle-> image_ratio_y

Now everything is working! BIG thanks a lot! ;)Reply