CakePHP helper and component to crop and resize images using jWindowCrop
##requirements GD Library
http://edapx.com/2012/08/14/crop-and-resize-images-in-cakephp/
copy JWindowHelper in your app/View/Helpers folder
copy CropComponent in your app/Controller/Components folder
copy webroot/js/jwindowcrop in your webroot/js folder
include the jquery and the Elements/jwindowcrop.ctp in the view where you need to display the
crop interface. In this same view, every image should be passed in an array Set the folder to store your image, has to be in the webroot.
See examples in the ImagesController to see how the crop&resize work. To debug the image sizes and x, y coordinates, set debug parameter in the helper to TRUE, ex:
<?= $this->Crop->ThumbInterface($img, $id_img, $image_directory, $debug = TRUE);?>
download the whole application(doesn't require a database connection to work) and point your browser at: http://localhost/images/crop
This source code is released under an MIT license.