tags:

views:

34

answers:

1

i seem to be too dumb for this :-)

i have an image say x=200 y=200

i want the image to stay the same but include a footer watermark lets say a.jpg which has a height of 20

so i want a final image of 220 and y 200

i tried it this way but it wont work

$newimage=imagecreatetruecolor($width,$height+25);
imagecopy($newimage, $this->parentInstance->getOldImage(), 0, 0, 0, 0, $watermarksize[0], $watermarksize[1]);
imagecopy($newimage, $watermark, $dest_x, $dest_y, 0, 0, $watermarksize[0], $watermarksize[1]);
imagecopy($this->parentInstance->getOldImage(), $newimage, 0, 0, 0, 0, $dest_x, $dest_y);
A: 

You need to lookup imagecopymerge() - http://php.net/manual/en/function.imagecopymerge.php

jakenoble