using crop with jCrop

See all posts Reply

using crop with jCrop new!
by Kris, 10 years, 11 months ago
Thank you for the class, could you please provide an example of how to use image crop with jcrop coordinates

thanks,
krisReply
Re: using crop with jCrop new!
by colin, 10 years, 11 months ago
Please see this threadReply
Re: using crop with jCrop new!
by tanny noagles, 4 years, 9 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, 4 years, 9 months ago
by the way, $image_width = $foo->image_src_x and $image_height = image_src_yReply