As I was trying to get a watermarking feature into CCK-module imagecache, I thought it might be usefull to have this watermark function in image.inc and image.gd.inc
It basically makes use of the php GD imagecopy function.
I have tested this with jpeg source images and a png watermark with transparency.
Patch to image.inc included
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | image.gd_.inc__0.patch | 1014 bytes | trogie |
| image.inc_.patch | 841 bytes | trogie |
Comments
Comment #1
trogie commentedAs image.inc got splitted up into image.gd.inc, this is the patch for image.gd.inc
Comment #2
drewish commentedit's too late to go into 6. also this shouldn't be a gd specific feature. it should be added as an image hook so that other toolkits can implement it too.
Comment #3
trogie commentedWith image hook do you refer to image-module or image.inc?
The first patch for image.inc on the original post is a hookfunction.
Comment #4
drewish commentedah, i see. you should post one patch for both files then.
Comment #5
drewish commentedtotally doesn't apply any more. in D7 we've got a lot more flexibility to extend toolkits. i'm doing this in the D7 version of ImageAPI so if this is still needed that would be a much better place to re-open this patch.