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

CommentFileSizeAuthor
#1 image.gd_.inc__0.patch1014 bytestrogie
image.inc_.patch841 bytestrogie

Comments

trogie’s picture

StatusFileSize
new1014 bytes

As image.inc got splitted up into image.gd.inc, this is the patch for image.gd.inc

drewish’s picture

Version: 6.x-dev » 7.x-dev
Status: Needs review » Needs work

it'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.

trogie’s picture

With image hook do you refer to image-module or image.inc?

The first patch for image.inc on the original post is a hookfunction.

drewish’s picture

ah, i see. you should post one patch for both files then.

drewish’s picture

Status: Needs work » Closed (won't fix)

totally 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.