Skip to content

CakePHP helper and compoent + jWindowCrop to crop and resize uploaded images.

Notifications You must be signed in to change notification settings

malikov/cakePHP-crop-thumb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CakePHP Crop Thumb

CakePHP helper and component to crop and resize images using jWindowCrop

##requirements GD Library

Installation

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);?>

Usage Examples

download the whole application(doesn't require a database connection to work) and point your browser at: http://localhost/images/crop

Author

Edap

License

This source code is released under an MIT license.

About

CakePHP helper and compoent + jWindowCrop to crop and resize uploaded images.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published