Reply to Re: using crop with jCrop

Re: using crop with jCrop new!
by tanny noagles, 4 years, 6 months ago
related to PHP Veror Upload, you should use the method: $foo->image_crop = array($top, $right, $bottom, $left):

Where:
- $top set how many pixel you are goint t crop on top.
- $right set how many pixel you are goint t crop on right.
- Etcetera.-.

So, if you consdiere that the coordinates of JCROP use a X and Y axis like this: c.x, c.y, c.x2, c.y2, then you have:

$top = $_POST["c.y"];
$right = $_POST["c.2"] - $image_width;
$bottom = $_POST["c.y"] - $image_height;
$left = $_POST["c.x"];

------------------
tanny.clReply

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