Coder Social home page Coder Social logo

virusvn / cakephp-crop-thumb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from malikov/cakephp-crop-thumb

0.0 2.0 0.0 4.16 MB

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

ApacheConf 0.01% PHP 99.26% Shell 0.08% CSS 0.43% JavaScript 0.14% Perl 0.09%

cakephp-crop-thumb's Introduction

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.

cakephp-crop-thumb's People

Contributors

edap avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.