Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Słaba jakość napisów po użyciu imagettftext()
Xayan
post 18.08.2010, 09:35:33
Post #1





Grupa: Zarejestrowani
Postów: 29
Pomógł: 0
Dołączył: 18.08.2010

Ostrzeżenie: (0%)
-----


Witam. Robię grę w stylu "Click and level me up!", ale mam problem z napisami. Otóż, ich jakość jest beznadziejna. Oto skrypt:

Kod
        $img = imagecreatefrompng("outfits/1.png");
        $color = imagecolorallocate($img, 255, 0, 0);
        $font = "font.ttf";
        imagettftext($img, 12, 0, 2, 15, $color, $font, urldecode($_GET['name']));
        $txt = 'Level: '.$level;
        imagettftext($img, 12, 0, 2, 30, $color, $font, $txt);
        $file = 'players/'.$_GET['name'].'.jpg';
        imagejpeg($img, $file, 100);
        mysql_query("UPDATE accounts SET level=".$level." WHERE nick=".urldecode($_GET['name'])."");
        echo '<img src="players/'.$_GET['name'].'.jpg"/>';


Wychodzi coś takiego:



Jak można poprawić ich jakość?

Ten post edytował Xayan 18.08.2010, 09:40:28
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 01:55