Reply to Re: crop using coordinates?

Re: crop using coordinates? new!
by Daniel Medina, 15 years, 11 months ago
I had the same problem again. I selected an area from a picture and the final image has the same area.

I need to create a new image with 197x70 pixels. Sometimes, the area selected is bigger than this, so i need to do a proportional resize.

here is a part of my code
$upload->image_convert = 'jpg';
$upload->jpeg_quality = 85;
$upload->image_crop=array($_POST["y1"], $upload->image_src_x - $_POST["x2"], $upload->image_src_y - $_POST["y2"], $_POST["x1"]);
$upload->image_ratio=true;
$upload->image_x=197;
$upload->image_ratio_y=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