Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> grafika, tak tak, dział dobry.. ;)
marcinvx
post 22.02.2011, 20:47:13
Post #1





Grupa: Zarejestrowani
Postów: 19
Pomógł: 0
Dołączył: 11.02.2011

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


  1. <?php
  2. // Create a 300x100 image
  3. $im = imagecreatetruecolor(300, 100);
  4. $red = imagecolorallocate($im, 0xFF, 0x00, 0x00);
  5. $black = imagecolorallocate($im, 0x00, 0x00, 0x00);
  6.  
  7. // Make the background red
  8. imagefilledrectangle($im, 0, 0, 299, 99, $red);
  9.  
  10. // Path to our ttf font file
  11. $font_file = './arial.ttf';
  12.  
  13. // Draw the text 'PHP Manual' using font size 13
  14. imagefttext($im, 13, 0, 105, 55, $black, $font_file, 'PHP Manual');
  15.  
  16. // Output image to the browser
  17. header('Content-Type: image/png');
  18.  
  19. imagepng($im);
  20. imagedestroy($im);
  21. ?>

Jak zrobić że zamiast czarnego tła jest obrazek ?
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 - 11:55