Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Biblioteka GD i text z dziwnym białym tłem.
raxon
post
Post #1





Grupa: Zarejestrowani
Postów: 44
Pomógł: 0
Dołączył: 30.06.2009

Ostrzeżenie: (10%)
X----


jeśli mam taki skrypt i gdy generuje mi obrazek to text jest z taką dziwną biała obwódką .
(IMG:http://iv.pl/images/48039298086944005291.jpg)


  1. $image = imagecreatefrompng($_POST['tlo']);
  2. imagealphablending($image, false);
  3. imagesavealpha($image, true);
  4.  
  5.  
  6. $rozmiar = 11;
  7. $kat = 0;
  8. $lewa = 60;
  9. $gora = 20;
  10. $kolor = imagecolorallocate($image, 0, 0, 0);
  11.  
  12.  
  13. imagettftext($image, $rozmiar, $kat, $lewa, $gora, $kolor, "arial.ttf", "Witaj!");


Ten post edytował raxon 27.08.2011, 20:16:01
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
raxon
post
Post #2





Grupa: Zarejestrowani
Postów: 44
Pomógł: 0
Dołączył: 30.06.2009

Ostrzeżenie: (10%)
X----


próbowałem to połączyć i nie wyszło (IMG:http://iv.pl/images/23505843453363959640.jpg)


  1. // Create some colors
  2. $white = imagecolorallocate($image, 255, 255, 255);
  3. $grey = imagecolorallocate($image, 128, 128, 128);
  4. $black = imagecolorallocate($image, 0, 0, 0);
  5.  
  6.  
  7. // The text to draw
  8. $text = 'Testing...';
  9. // Replace path by your own font path
  10. $font = 'arial.ttf';
  11.  
  12. // Add some shadow to the text
  13. imagettftext($image,12, 0, 61, 21, $grey, $font, $text);
  14.  
  15. // Add the text
  16. imagettftext($image, 12, 0, 60, 20, $black, $font, $text);
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 14.10.2025 - 18:04