OK, here's a total re-write of the plugins I developed a few months ago.
Now we have a hook system that makes sense, I can do the lot as a stand-alone module
BUT...
I don't want to branch these off into a new project. I'd rather submit them to live as optionals inside this package - so as to avoid them going too strangely out of synch.
I think a TODO is to split these funcs off into their own include - to lighten the server load, but that looks easy.
here's the readme and a few recipes.
Imagecache actions
-------------------
Additional actions for imagecache processing.
Exposes some of the simpler PHP 'imagefilter' actions (colorshift,
brightness, negative)
- A transparency masker for merging with backgrounds.
- A pseudo - file conversion feature.
Compatible with the 2008 revision (imagecache 2)


Comments
Comment #1
dman commentedComment #2
eaton commenteddman, this is pretty spectacular stuff. I just ran it through its paces and it seems to work pretty well, though I was getting quite a few errors thrown with complaints about how imagefilter() requires certain numbers of parameters. The following changed version of imagecache_gd_imagefilter() seems to fix it, ensuring that only the proper number of params is ever passed in for each filter. Not sure if this is just masking the problem, but all the options are now working like a charm on my setup. I'd love to see these make it into the base imagecache setup.
Comment #3
dman commentedThanks for finding that. I've never known PHP functions to complain about getting too many parameters before, when the spec has them with a variable number or args. It has a point though...
Actually, I wasn't even testing the true PHP imagefilter - I thought it would just work, but I hadn't installed it myself. I supplied an optional library that will do the jobs even if the extension isn't enabled, because deployment issues are important..
If that's the case, then that stub function I'm using in the middle there isn't as much of a lazy short-cut as I thought it was.
Anyway, if this is moving in the right direction, I also have, waiting in the wings, an SVG process (!) which can do rounded corners, drop shadows, ornamental frames and watermarks (!) ... once you learn and install SVG ;-)
Still, no hurry. I think that someone else may have inspiration for an easier way to do watermarks...
I miss the old all-in-one settings interface. Testing and tweaking this was a bore with all the pageloads.
Oh yeah, back last time I did this, I had a demo 'preview' image for each filter on the page. Maybe I'll see if I can bring that back.
Comment #4
dman commentedping!
Is there any possibility of getting this added under contrib? I don't want to fork it.
Comment #5
dopry commentedNo, totally gonna get committed next time I have an imagefield work slot.
Comment #6
eaton commenteddopry, dman, I'm currently chugging through the D6 ports for image related stuff. If you'd like I can take a stab at a D6 version of this while I'm at it. Any interest?
Comment #7
dman commentedNo objection. :)
As it's mostly hanging off the imagecache api, I don't know what, if any change there will be to D6, but more eyes on code is cool.
...Just thinking the above patch may need a hook_install to flush the imagecache actions cache on install, against the 'current' code.
Comment #8
dman commentedOh. This add-on may be a renamed into 'imagecache_color_actions' if you feel.
... now that we have imagecache canvas actions also waiting to go. (or shall we call that 'layer' actions)?
Comment #9
dopry commentednote... I did add imagefilter and imagerotate to imageapi_gd.... so those functions should be consistantly available now...
Comment #10
dopry commentedHere is an updated and untested version for changes I made in imageapi if anyone wants to give it a go.. mainly stealing imagefilter.
Comment #11
dman commentedThis is now released as http://drupal.org/project/imagecache_actions
Closing
Comment #12
dman commentedCLOSING! :-B