JCrop integration with CKFinder
Posted on Thursday, 23rd January 2014
Recently I was working on a project that required cropping capabilities CK Finder. After looking around I couldn’t find any suitable solution so decided to write my own. Having never built a plugin for CK Finder I hit the documentation to look at what was involved. It’s all pretty straight forward after a little big of digging into the API and got started.
First of all I had to find a suitable cropping plugging and after a bit of googling I stumbled upon the a JQuery based image cropping script called JCrop that did everything I needed. It had a nice clean API, was regularly updated and worked well in multiple browsers.
All of the image processing is performed in PHP, but now that I’m doing more and more C# lately I’ll probably write a C# version too.
In total it took me an evening to write and works pretty well. You can drag across your chosen image to set the crop or you can specify the width and/or height of the crop and image quality of the cropped image.
I’ve also added it to Github so if anyone would like to use/fork it then feel free to do so.
Enjoy this post? Don't be a stranger!
Follow me on Twitter at @_josephwoodward and say Hi! I love to learn in the open, meet others in the community and talk Go, software engineering and distributed systems related topics.