Reply to Re: crop using coordinates?

Re: crop using coordinates? new!
by colin, 15 years, 4 months ago
You can use only one image_ratio..... parameter at the same time.

If you have an area of any size, and want to make it fit within 197x70, you have two alternatives:

1. You make it fit within 197x70, the area is resized proportionally, but the image will not fill all 197x70 (there may be some space on the sides or top and bottom). You would do:
$upload->image_x=197;
$upload->image_y=70;
$upload->image_ratio=true;            
$upload->process('/mydir/');

2. You make it fit within 197x70, the area is resized proportionally, and the image will not fill all 197x70 (some parts of the area will be cut off so that the proportional image fits in 197x70). You would do:
$upload->image_x=197;
$upload->image_y=70;
$upload->image_ratio_crop=true;            
$upload->process('/mydir/');
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