--- ../GD-2.30-orig/GD.pm Wed Oct 19 00:49:26 2005 +++ GD.pm Fri Aug 17 01:02:03 2007 @@ -1118,6 +1118,30 @@ Example: # the rectangle starting at (10,10) in $myImage, merging 50% $myImage->copyMerge($srcImage,10,10,0,0,25,25,50); +=item B<$image-Eblend($sourceImage,$dstX,$dstY,> +B< $srcX,$srcY,$width,$height,$opacity)> + +This blends two true-color images using using alpha channel information +from $sourceImage. This assumes that $image has alphaBlending() set. +The last parameter indicates the opacity of the source image. It +has a valid range between 0 and 100, where 100 would produce +the same result as calling copy() and 0 is a no-op (i.e., 100% +transparent sourceImage). This function is ideal for watermarking +purpose, where a watermark image (e.g., an RGBA PNG image) can be +blended onto images at different levels of transparency. + +If either of the images is not true-color or alphaBlending() is not set +for the destination image, the result is same as calling copyMerge(). + +Example: + + $myImage = new GD::Image($source_file); + $myWatermark = new GD::Image($watermark_file); + # Copy the watermark image onto the $myImage at + # 65% opacity. + $opacity = 65; + $myImage->blend($myWatermark,10,10,0,0,25,25,$opacity); + =item B<$image-EcopyMergeGray($sourceImage,$dstX,$dstY,> B< $srcX,$srcY,$width,$height,$percent)>