I made a small screencast about a new Drupal module I'm currently writing for a client. 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 (because in my use case, the client needs different image versions depending on where they should appear (teaser, list, search and full node view). The difference with eyedrop and imagefield_crop is that it doesn't provide it's own image cropping widget, instead we hook into the existing imagefield. It is not fully finished yet, but you can see a preview on http://realize.be/imagecache-2-and-imagecrop.
Things I would like to hear some feedback on:
- Can the patch on http://drupal.org/node/231663 get into imagecache 2? The code should be reviewed though, but basically what it does is passing along the presetid in the _imagecache_apply_action function.
- Should I contribute this as a seperate module or should we combine efforts with eyedrop/imagefield_crop/transformer ? IMO I think we should somehow combine our efforts and definitely rely on imagecache 2 to apply actions.
Regards,
Kris
Comments
Great stuff
This looks just great.
This definitely answers the issue of Relevance-Enhanced Image Reduction. I know I received a few requests to support this kind of feature, but imagefield_crop.module, being just a widget, can't really do that.
It is also sounds quite reasonable to rely on imagecache for this - I got a couple of requests for this too.
If this makes sense, I would like to combine the efforts, but I am not sure how. It seems like your module does everything that imagefield_crop does..
--yuval
Mm you're right about the
Mm you're right about the fact that my module basically does the same thing. I've been working on it some more and it's almost 'release-ready' so I think I'll go ahead and add it to CVS and create a project page. Maybe if you're interested I can give you cvs access if you want to help out with this module, because I can sure have some help/tips/tricks on the jquery and css part. I'll also make a reference to your module too, because it's thanks to yours I got the idea to start with it in the first place.
btw, i'm still looking for a good name, if you have suggestions, feel free to shoot :)
I am not so good at names
I am not so good at names myself, but the simplest would probably be the best:
* javascript_crop
* image_crop
* crop
* multi_crop
* ...
..
If you go for a name that doesn't include the word 'crop' (e.g. 'image_manip'), people might expect it to do more than just cropping..
Please update here when you have the new module.
--yuval
CVS is up and development
CVS is up and development release is out!
http://drupal.org/project/imagecrop
It's quite usable allready but there's (as always) some work to be done on code, javascript and css (css and javascript only tested it on firefox 2).
Feel free to test out !