lord3490
Neues Mitglied
ja ich wollte mir mal ein Bild mit PHP entwerfen, dass richtig schöne Farbübergänge hat. Es ist eigentlich noch relativ simpel, aber irgentwas hab ich wohl falsch gemacht :roll:
ich bitte um Hilfe...
[php:1:a7b38f86ce]<?php
header("Content-Type: image/png");
# Zeichenfläche definieren
$width = 320;
$height = 320;
$image = imagecreate($width, $height);
# Farben definieren
# Für diese PHP (noch) nicht wichtig!!!!
$black = imagecolorallocate($image, 0 ,0 ,0);
$white = imagecolorallocate($image,255,255,255);
$blue = imagecolorallocate($image, 0 ,0 ,255);
$red = imagecolorallocate($image, 255,0 ,0);
$green = imagecolorallocate($image, 0 ,255,0);
$gold = imagecolorallocate($image,255,125,0);
$darkgreen = imagecolorallocate($image, 0, 127, 0);
# Zeichnen
$b=0;
$xpos=0;
$ypos=0;
$i=0;
$j=0;
for($ypos=0;$ypos<255;$ypos++)
{
$r++;
$g=0;
for($xpos=0;$xpos<255;$xpos++)
{
$g++;
$farbe1 = imagecolorallocate($image, $r, $g, $b);
imagesetpixel ($image, $xpos, $ypos,$farbe1);
}
}
# Zeichnung erzeugen
imagepng($image);
imagedestroy($image);
?>[/php:1:a7b38f86ce]
edit: ach ja hier könnt ihrs angucken: http://www.skateboa.de.vu/tests/farbflash.php
ich bitte um Hilfe...
[php:1:a7b38f86ce]<?php
header("Content-Type: image/png");
# Zeichenfläche definieren
$width = 320;
$height = 320;
$image = imagecreate($width, $height);
# Farben definieren
# Für diese PHP (noch) nicht wichtig!!!!
$black = imagecolorallocate($image, 0 ,0 ,0);
$white = imagecolorallocate($image,255,255,255);
$blue = imagecolorallocate($image, 0 ,0 ,255);
$red = imagecolorallocate($image, 255,0 ,0);
$green = imagecolorallocate($image, 0 ,255,0);
$gold = imagecolorallocate($image,255,125,0);
$darkgreen = imagecolorallocate($image, 0, 127, 0);
# Zeichnen
$b=0;
$xpos=0;
$ypos=0;
$i=0;
$j=0;
for($ypos=0;$ypos<255;$ypos++)
{
$r++;
$g=0;
for($xpos=0;$xpos<255;$xpos++)
{
$g++;
$farbe1 = imagecolorallocate($image, $r, $g, $b);
imagesetpixel ($image, $xpos, $ypos,$farbe1);
}
}
# Zeichnung erzeugen
imagepng($image);
imagedestroy($image);
?>[/php:1:a7b38f86ce]
edit: ach ja hier könnt ihrs angucken: http://www.skateboa.de.vu/tests/farbflash.php