Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> grafika, tak tak, dział dobry.. ;)
marcinvx
post
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
 
Start new topic
Odpowiedzi
marcinvx
post
Post #2





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

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


aa, okej, Dzięki.. Już zrobiłem. (IMG:style_emoticons/default/smile.gif)

  1. <?php
  2. // Create image instances
  3. $dest = imagecreatefromgif('sygnaturka.gif');
  4. $src = imagecreatefromgif('sygnaturka.gif');
  5.  
  6. // Copy and merge
  7. imagecopymerge($dest, $src, 10, 10, 0, 0, 122, 452, 0);
  8.  
  9.  
  10. $red = imagecolorallocate($src, 0x00, 0x00, 0x00);
  11.  
  12. $font_file = './arial.ttf';
  13.  
  14. // Draw the text 'PHP Manual' using font size 13
  15.  
  16. imagefttext($dest, 7, 0, 65, 58, $red, $font_file, '5');
  17. // Output and free from memory
  18.  
  19. header('Content-Type: image/gif');
  20. imagegif($dest);
  21.  
  22. imagedestroy($dest);
  23. imagedestroy($src);
  24. ?>


;//

a zeby nie robić kolejnego tematu to jak zrobić żeby jak wpiszę
http://nazwa-strony.pl/sygnatura.gif
to się wyświetli właśnie ten obrazek ?
To co wpisane ma być zmienne także zrobienie go jako tako na stałe odpada. ; P

Słyszałem ze coś z htaccess ale nie moge nic wyggooglować.. ;/
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: 6.10.2025 - 02:54