using crop with jCrop

See all posts See thread Reply

Re: using crop with jCrop new!
by tanny noagles, 3 years, 12 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
Re: using crop with jCrop new!
by tanny noagles, 3 years, 12 months ago
by the way, $image_width = $foo->image_src_x and $image_height = image_src_yReply