├── screenshot.png ├── jcrop ├── css │ ├── Jcrop.gif │ ├── jquery.Jcrop.min.css │ └── jquery.Jcrop.css ├── demos │ ├── demo_files │ │ ├── pool.jpg │ │ ├── sago.jpg │ │ ├── sagomod.jpg │ │ ├── sagomod.png │ │ └── demos.css │ ├── tutorial1.html │ ├── non-image.html │ ├── tutorial2.html │ ├── tutorial3.html │ ├── crop.php │ ├── styling.html │ ├── jquery-ui.html │ ├── tutorial4.html │ └── tutorial5.html ├── MIT-LICENSE.txt ├── index.html ├── README.md └── js │ ├── jquery.color.js │ ├── jquery.Jcrop.min.js │ └── jquery.Jcrop.js ├── lib ├── Process.php └── Boot.php ├── config.php ├── README.md ├── LICENSE ├── plugin.js ├── plugin.php └── dialog.php /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josephwoodward/CKFinderJcrop/master/screenshot.png -------------------------------------------------------------------------------- /jcrop/css/Jcrop.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josephwoodward/CKFinderJcrop/master/jcrop/css/Jcrop.gif -------------------------------------------------------------------------------- /jcrop/demos/demo_files/pool.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josephwoodward/CKFinderJcrop/master/jcrop/demos/demo_files/pool.jpg -------------------------------------------------------------------------------- /jcrop/demos/demo_files/sago.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josephwoodward/CKFinderJcrop/master/jcrop/demos/demo_files/sago.jpg -------------------------------------------------------------------------------- /jcrop/demos/demo_files/sagomod.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josephwoodward/CKFinderJcrop/master/jcrop/demos/demo_files/sagomod.jpg -------------------------------------------------------------------------------- /jcrop/demos/demo_files/sagomod.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/josephwoodward/CKFinderJcrop/master/jcrop/demos/demo_files/sagomod.png -------------------------------------------------------------------------------- /lib/Process.php: -------------------------------------------------------------------------------- 1 | isPosted() ) { 8 | $new_file = $image->resize(); 9 | echo 'Image successfully cropped and is located within the same folder with name: \''.$new_file.'\''; 10 | } 11 | -------------------------------------------------------------------------------- /config.php: -------------------------------------------------------------------------------- 1 | 'Default' 5 | ), 6 | array( 7 | 'title'=>'Example', 8 | 'over_write'=>'true', 9 | 'aspectRatio'=>array( 10 | 'width'=>10, 11 | 'height'=>5 12 | ), 13 | 'resize'=> array( 14 | 'width'=>1000, 15 | 'height'=>500 16 | ) 17 | ) 18 | ); 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | CKFinderJcrop 2 | ============= 3 | CKFinder plugin of a much needed image cropping feature using the JQuery based JCrop (http://deepliquid.com/content/Jcrop.html). 4 | 5 |  6 | 7 | Features : 8 | 9 | Presets - You can define your own rules in config.php file, and easly crop-resize your images. 10 | Aspect Ratio - You can cut your images with aspect ratio 11 | Resize - If you want, you can resize your images after cutting them. 12 | Overwrite - If you don't want to create a new file, you may overwirte it. 13 | 14 | 15 | To install the plugin 16 | 1. Create folder "cropresize" inside CKfinder/plugins 17 | 2. Export the code inside this folder 18 | 3. Edit CKfinder/config.php and at the end of the file add line 19 | 20 | > include_once "plugins/cropresize/plugin.php"; 21 | 22 | Edit config.php and define your own presets. An example plesed is allready defined. 23 | Note: Do not delete default preset in config.php 24 | 25 | License 26 | ------- 27 | All files are under the [The MIT License (MIT) license][license]. 28 | 29 | [license]:http://en.wikipedia.org/wiki/MIT_License 30 | 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /jcrop/MIT-LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 Tapmodo Interactive LLC, 2 | http://github.com/tapmodo/Jcrop 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /jcrop/demos/tutorial1.html: -------------------------------------------------------------------------------- 1 | 3 | 4 |
5 | 6 |
30 |
31 | 32 | This example demonstrates the default behavior of Jcrop. 33 | Since no event handlers have been attached it only performs 34 | the cropping behavior. 35 |
36 | 37 |44 | 45 | This is an example of attaching Jcrop to a target that is not an image. You are now cropping a paragraph tag. 46 | 47 |
48 | 49 |50 | Attaching Jcrop to a non-image element. 51 | This is mostly useful to implement other interfaces, such as canvas or over an arbitrary div. 52 |
53 | 54 |
51 |
52 |
53 |
67 |
68 | 69 | An example with a basic event handler. Here we've tied 70 | several form values together with a simple event handler invocation. 71 | The result is that the form values are updated in real-time as 72 | the selection is changed using Jcrop's onChange handler. 73 |
74 | 75 |76 | That's how easily Jcrop can be integrated into a traditional web form! 77 |
78 | 79 |
64 |
65 | |
66 | 67 | 70 | | 71 |
75 | An example implementing a preview pane. 76 | Obviously the most visual demo, the preview pane is accomplished 77 | entirely outside of Jcrop with a simple jQuery-flavored callback. 78 | This type of interface could be useful for creating a thumbnail 79 | or avatar. The onChange event handler is used to update the 80 | view in the preview pane. 81 |
82 | 83 |
80 |
81 |
82 |
89 |
90 | 91 | An example server-side crop script. Hidden form values 92 | are set when a selection is made. If you press the Crop Image 93 | button, the form will be submitted and a 150x150 thumbnail will be 94 | dumped to the browser. Try it! 95 |
96 | 97 |
66 |
67 | 79 | Example styling tricks. Click the buttons above to change the appearance of Jcrop in real-time. 80 |
81 | 82 |79 | This example demonstrates more complex invocations of Jcrop. 80 | These techniques can be integrated with other libraries or more 81 | complex user interfaces. 82 |
83 | 84 |92 | Prior to v0.9.10 release, it was difficult to instantiate Jcrop 93 | on an image unless it was visible on the page. This meant that 94 | opening Jcrop in a dialog or a hidden tab was problematic, and 95 | involved specific timing (e.g. attaching the Jcrop method 96 | call to an "open" handler for the UI element). 97 |
98 |99 | This demo shows simple invocations of Jcrop using jQuery UI. If 100 | you are using a different library to produce dialog boxes or tabs, 101 | the theory of operation should be similar. 102 |
103 | 104 | 105 |
108 |
147 |
148 |
149 |
150 |
151 |
152 |
159 |
160 | 161 | Animation/Transitions. 162 | Demonstration of animateTo API method and transitions for bgColor 163 | and bgOpacity options. Color fading requires inclusion of John Resig's 164 | jQuery Color 165 | Animations plugin. If it is not included, colors will not fade. 166 |
167 | 168 |
195 |
196 |