oto mój kod
<?php include ('session.php'); $tekst1 = $_SESSION['gora1']; if ($karta[2] != '') { $tekst2 = $karta[0].' '.$karta[1].' '.$karta[2].' '.$karta[3]; $tekst3 = $karta[4]; } $tekst4 = $_SESSION['gora3']; $tekst5 = $_SESSION['gora4']; $tekst6 = $_SESSION['gora5']; $im = @ImageCreateFromJPEG ('../jpg/1_jpg.jpg') $background_color1 = imagecolorallocate($im, 255, 255, 255); $background_color2 = imagecolorallocate($im, 212, 212, 212); $text_color1 = imagecolorallocate($im, 0, 0, 0); $text_color2 = imagecolorallocate($im, 212, 212, 212); //imagestring($im, 2, 95, 24, "$tekst1", $text_color1); //imagestring($im, 2, 95, 22, "$tekst1", $background_color1); imagettftext($im, 20, 0, 95, 24, $text_color1, 'font/arial.ttf',$tekst1); imagestring($im, 2, 345, 24, "$tekst2", $text_color1); imagestring($im, 2, 345, 22, "$tekst2", $background_color1); imagestring($im, 2, 355, 34, "$tekst3", $text_color1); imagestring($im, 2, 355, 32, "$tekst3", $background_color1); imagestring($im, 2, 345, 50, "$tekst5", $text_color1); imagestring($im, 2, 345, 48, "$tekst5", $background_color2); imagestring($im, 2, 640, 24, "$tekst4", $text_color1); imagestring($im, 2, 640, 22, "$tekst4", $background_color1); imagestring($im, 2, 620, 50, "$tekst6", $text_color1); imagestring($im, 2, 620, 48, "$tekst6", $background_color2); imagepng($im); imagedestroy($im); ?>
Nie wiem , czcionkę arial.ttf wziąłem z Windowsa
Z imagestring działa, ale chciałem "upiększyć" w jednym miejscu