Вот пример использования водяных знаков в горячем режиме с использованием GD:
const CORNER_TOP_LEFT = 1;
const CORNER_TOP_RIGHT = 2;
const CORNER_BOTTOM_LEFT = 3;
const CORNER_BOTTOM_RIGHT = 4;
$backgroundImagePath = "img/stamp.png";
$corner=CORNER_BOTTOM_RIGHT;
$alpha=60
$img_res=@imagecreatefromjpeg($filename);
$img_info=getimagesize($backgroundImagePath);
switch ($corner){
case CORNER_TOP_LEFT:
if(!imagecopymerge ($this->imageRes, $img_res, 0, 0, 0, 0, $img_info[0], $img_info[1], $alpha)){
throw new RuntimeException("Unable to make stamp!");
}
break;
case CORNER_TOP_RIGHT:
if(!imagecopymerge ($this->imageRes, $img_res, $this->info[0]-$img_info[0], 0, 0, 0, $img_info[0], $img_info[1], $alpha)){
throw new RuntimeException("Unable to make stamp!");
}
break;
case CORNER_BOTTOM_LEFT:
if(!imagecopymerge ($this->imageRes, $img_res, 0, $this->info[1]-$img_info[1], 0, 0, $img_info[0], $img_info[1], $alpha)){
throw new RuntimeException("Unable to make stamp!");
}
break;
case CORNER_BOTTOM_RIGHT:
if(!imagecopymerge ($this->imageRes, $img_res, $this->info[0]-$img_info[0], $this->info[1]-$img_info[1], 0, 0, $img_info[0], $img_info[1], $alpha)){
throw new RuntimeException("Unable to make stamp!");
}
break;
}
imagejpeg($img_res, "/path/to/save/image.jpg", 100);