Imagecache javascript crop has a scaling option!

It took me some time to realize I would not find a decent solution with Jquery Interface to implement some sort of scaling function in my Imagecache javascript crop (formerly imagecrop) module. After some thinking, I found a solution which satisfies me enough to release this for drupal 5. It's now possible to create an imagecache preset with only the javascript action and use the original image to crop - instead of first adding a scaling function, which would result in frustration. On the crop page you can scale the image now. It's a select box at this point, I might change it to a textfield if I get many request for this. For now, it does what I and some clients want. Submit a patch if you want otherwhise (think: a setting on the imagecrop settings page). Anyway, there's an issue about this feature at Use that page to report problems if you find them. Oh - and I can't stress this enough - *only* about the scaling problem in D5, thanks :) So, if you're interested, go to and test out the development version. When the issue above is closed in two weeks, I'll roll out a new release containing some other small, but important fixes! I'll start porting the project to D6 after the drupalcon and - good news - it will use JQuery UI instead of Interface which gives me the opportunity to actually scale the image easier with jquery instead of a page refresh. Update Aug 3, 20:34: A cool patch by swortis now supports the thickbox module. Instead of a window popup, the thickbox overlay is used. Coolness! Trivial stuff to mention:

  • I renamed the project to Imagecache javascript crop instead of imagecrop. Makes more sense, really.
  • Yhager, ping-pong me on irc next week, we really need to have that talk!

Imagecrop 5.x-1.0 is out

A first official release of imagecrop is out today. This module uses the power of imagecache 2 which let other modules define their own image actions. Imagecrop enables an action where you can crop your images with a javascript toolbox as long as a preset has the javascript crop action. The main difference with projects like eyedrop or imagefield_crop is that it doesn't provide it's own widget to upload images, instead it just 'hooks' into image modules/fields. Supported modules so far are image, imagefield and node_images. The first release has been tested in a production environment for about 2 months now and suffers no real bugs anymore except some browser caching problems now and then on IE, so this is also a call for reviewers and other smart people to test and (hopefully) submit patches! I've prepared another screencast to see it in action on the image and node images module.

Of course, a better way than looking at a screencast is to download it yourself and test it! Patches are even better. Some suggestions: browser caching problems, hook_imagecrop so your own custom module can benefit from it etc..


drupal, imagecrop

Imagecrop on drupal cvs

I just added my imagecrop module to cvs on Drupal. A 5.x development version should be out soon, so everyone is invited to test and submit patches. A lot of things need to be optimized, especially the javascript and css. If anyone is interested being a co-maintainer, I'd be glad to give access to cvs also.

This module makes a javascript toolbox action available thanks to the power of Imagecache 2. It can currently 'hook' into the image module and cck imagefield widget. It provides a 'javascript crop' link on the edit form of an image node or a node with an imagefield widget. The popup window displays all available imagecache presets with a javascript crop action. In your theming you can use the imagecache theme function with a preset and the imagecache action makes a database call to choose the right crop area you have chosen.

More info, CVS and downloads on and a screencast is also available.


drupal, imagecrop

Imagecache 2 and imagecrop

I made a small screencast about a new Drupal module I'm currently writing. It uses imagecache 2 and it's ability to let other modules define their own actions. My module provides a javascript crop action and a cropping box on the image you want to crop. It currently can hook into the imagefield widget and knows which presets in imagecache are available with the 'javascript crop' action. The difference with eyedrop and imagefield_crop is that it doesn't provide its own image cropping widget, instead we hook into the existing imagefield. It is not fully finished yet, but you can see a preview underneath.

Things I would like to see happening in the future:

  • Hook into more modules (image, gallery etc).
  • Get this patch into ImageCache 2. (the patch isn't needed anymore!)
  • Merge this module with eyedrop & imagefield crop / combine our efforts since Imagecache has a really strong API.
Subscribe to RSS - imagecrop

You are here