Forum de discussion et d'aide au php
Vous n'êtes pas identifié.
|
Regles d'utilisation des forums : pensez à toujours les respecter si vous désirez obtenir des réponses rapides. FAQ : pensez à toujours chercher dedans si la réponse à votre question est dedans. Proposez vos news : si vous avez un evenement à annoncer le chat : venez discuter de php. |
||
Coucou!
Voila je débute à peine dans la librarieGD, et j'ai un petit soucis pour mettre du texte sur mon image ![]()
Voici le code :
<?php
$habbo = $_GET['habbo1'];
$habbo2 = $_GET['habbo2'];
$im = imagecreatetruecolor(185, 178);
$bg = imagecolorallocate($im, 255, 255, 255);
$font = "volterb.ttf";
imagefill($im,0,0,$bg);
imagecolortransparent($im, $bg);
$im = imagecreatefromgif("profile.gif");
$fig1 = "http://www.habbo.fr/habbo-imaging/avatarimage?user=$habbo&action=std&direction=1&head_direction=1&gesture=eyb&size=l&img_format=gif";
$fig2 = "http://www.habbo.fr/habbo-imaging/avatarimage?user=$habbo2&action=std&direction=5&head_direction=5&gesture=eyb&size=l&img_format=gif";
$figure1 = imagecreatefromgif($fig1);
$figure2 = imagecreatefromgif($fig2);
$fig1y = imagesy($figure1);
$fig1x = imagesx($figure1);
$fig2y = imagesy($figure2);
$fig2x = imagesx($figure2);
imagecopy($im, $figure1, 45, 70, 0, 0, $fig1x, $fig1y);
imagecopy($im, $figure2, 75, 70, 0, 0, $fig2x, $fig2y);
imagefttext($im, 75, 90, 0, 0, $bg, $font, "Guese");
header("Content-type: image/gif");
imagegif($im);
imagedestroy($im);
?>Voici le résultat -> http://habbic.fr/kiss/generate.php?habb … 2=alex0013
J'aimerais pouvoir mettre Guese au dessus du premier personnage et alex0013 au dessus du second personnage.
Merci de votre aide ![]()
Dernière modification par GS (25-11-2008 09:41:21)
Hors ligne
Oui j'ai essayé 2 types de .ttf
Hors ligne