| |
| * Link führt ins Internet |
|

| |
Befehl | Version | Beschreibung | Beispiel | Ausgabe |
Befehl
| int imagesetpixel ( resource $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
|
|
|
|
|
|


|