Te dejo un ejemplo funcional del manual php:
Código PHP:
Ver original<?php
header('Content-Type: image/jpg'); $WatermarkNeeded = true;
/* Get image info */
if ($WatermarkNeeded)
{
/* Set text info */
$Text="Copyright Ben Clay" ;
$Font="arial.ttf" ;
$Rotation = 30 ;
/* Make a copy image */
ImageCopy ($OriginalImage,$Image,0,0,0,0,$sx,$sy) ; /* Iterate to get the size up */
$FontSize=1 ;
do
{
$FontSize *= 1.1 ;
$TextWidth = abs($Box[4] - $Box[0]) ; $TextHeight = abs($Box[5] - $Box[1]) ; }
while ($TextWidth < $sx*0.7) ;
/* Awkward maths to get the origin of the text in the right place */
$x = $sx/2 - cos(deg2rad($Rotation))*$TextWidth/2 ; /* Make shadow text first followed by solid text */
ImageTTFText ($Image,$FontSize,$Rotation,$x+4,$y+4,$FontShadow,$Font,$Text); ImageTTFText ($Image,$FontSize,$Rotation,$x,$y,$FontColor,$Font,$Text); /* merge original image into version with text to show image through text */
}
?>
http://php.net/manual/en/function.im...text.php#70946
O también conozco esta clase ImageWorkshop, que hace casi lo mismo:
http://phpimageworkshop.com/tutorial...watermark.html
Saludos.