Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php] imagefill()
-Himp-
post
Post #1





Goście







  1. <?
  2.  
  3. header("Content-type: image/png");
  4. echo"<img src="licznik.php?wizyty=".$licz."" />";
  5.  
  6. $orange=imagecolorallocate($img,220,210,60);
  7. $white=imagecolorallocate($img,225,225,225);
  8. $black=imagecolorallocate($img,0,0,0);
  9.  
  10. imagefill($img,0,0,$black);
  11.  
  12. ?>


Cytat


Co jest nie tak?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
mike
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 7 494
Pomógł: 302
Dołączył: 31.03.2004

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


A co to za dziwoląg. Czytałeś w ogóle manuala?
Obrazki generowane za pomoca php wstawia się tak:

image.php
  1. <?php
  2.  
  3. header('Content-type: image/png');
  4.  
  5. $resImg = imagecreatetruecolor( 100, 200 ); // wypadałoby stworzyć obrazek!
  6.  
  7. $intBlack = imagecolorallocate( $resImg, 0, 0, 0 );
  8.  
  9. imagefill( $resImg, 0, 0, $intBlack );
  10.  
  11. imagepng( $resImg ); // dać go na ekran
  12. imagedestroy( $resImg ); // i wywalić z pamięci
  13.  
  14. ?>


index.html
  1. <img src="image.php" alt="" />
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 - 00:20