Choose:Python or Php
Befehl | Version | Beschreibung | Beispiel | Ausgabe |
Befehl int imagesetpixel ( int im, int x, int y, int col )
Version Beschreibung
Mit imagesetpixel() zeichnet man auf einer Arbeitsfl�che (im) ein einzelnes Pixel
mit der Farbe col. Die Koordinaten des Pixels stehen in den Parametern x und y.
Siehe auch:
� imagecreate ()
� imagecolorallocate ()
� imagegif ()
Beispiel
<?php
$image = imagecreate ( 300 , 150 );
$farbe_body = imagecolorallocate ( $image , 243 , 243 , 243 );
$farbe_b = imagecolorallocate ( $image , 10 , 36 , 106 );
$y = 50 ;
$z = 30 ;
for( $x = 0 ; $x <= 20 ; $x ++){
imagesetpixel ( $image , $z , $y , $farbe_b );
imagesetpixel ( $image , $y , $z , $farbe_b );
$y += 5 ;
$z += 5 ;
}
imagegif ( $image );
?>
Ausgabe
Aktueller Buchtipp
Franzis Verlag
ca. 600
Seiten
EUR 44,95