[Typo3-dev] use IM combine funtion in an extension

Kraft Bernhard kraftb at gmx.net
Tue Feb 22 15:44:08 CET 2005


Wengrzik, Andreas wrote:
> this looks a little big like an watermark, but i need to combine two image to get an transparent watermark - that will look much better than only text in an image.
> I also want to use an image not only text...

You can combine two images using a mask.
This means you take your main image as background and then put a second image (the overlay image) over it
using a grayscale mask - in the areas where the mask image is black (i think: or white?) you will see the
main image and where it is white you will see the overlaid image ...

So you can use a program like photoshop to create the overlay and mask image and then use the combine function
to create the watermark on every image ...

You can combine those images without the need for any TS code filled into some arrays by using:

t3lib_stdgraphic::combineExec($input, $overlay, $mask, $output);

If you really need to use the IMAGE() function because you are also doing other stuff and this
needs to be done via TS then you could add the following TS to your IMAGE-setup (into the array):

99 = IMAGE
99 {
   file = /path/to/my/overlay.png
   offset = 0,0
   mask = /path/to/my/mask.png
}


Hope I understood what you meant and helped ...

greets,
Bernhard
-- 
Kraft Bernhard
MOKKA Medienagentur <http://www.mokka.at>
T: +43 - 1 - 895 33 33 - 50




More information about the TYPO3-dev mailing list