//couleur du texte à ajouter
$textcolor = imagecolorallocate($destination, 000, 000, 000);
$font=3; //de 1 à 5
$texte=" copyright DrHelmut 2006 ";
$longueurTxt=strlen($texte)*imagefontwidth($font) ;
$hauteurTxt=imagefontheight($font);
//on crée un rectangle coloré autour de la signature (orangé)
$color=0xFF8800;
imagefilledrectangle($destination, 0, $height, $longueurTxt+2, $height-$hauteurTxt-2, $color);
//ajout de la signature, en bas à gauche
imagestring($destination, $font, 2, $height-$hauteurTxt-2, $texte, $textcolor);
// affichage de l'image
($imgType contient le type - jpg, gif ou png)
header("Content-type: image/".$imgType);
call_user_func('image'.$imgType, $destination);
Partager