Hallo,
ik heb een script geschreven in php om text op een plaatje te zetten.
Nu kan ik alleen $textcolor = imagecolorallocate($im, 0, 0, 255); aanpassen wat ik wil. De text blijft bruin.
Hebben jullie enig idee?
code:
<?php
header ("Content-type: image/gif");
$a = $_GET["fname"];
$b = $_GET["id1"];
$c = $_GET["id2"];
$d = $_GET["league"];
// try changing this as well
$string = $a;
$string2 = $b . "." . $c;
$string3 = $d;
$font = 5;
$im = imagecreatefromgif("protoss.gif");
$x1 = imagesx($im) - 150;
$y1 = imagesy($im) - 90;
$x2 = imagesx($im) - 150;
$y2 = imagesy($im) - 70;
$x3 = imagesx($im) - 150;
$y3 = imagesy($im) - 50;
$backgroundColor = imagecolorallocate ($im, 0, 0, 0);
$textcolor = imagecolorallocate($im, 0, 0, 255);
imagestring ($im, $font, $x1, $y1, $string, $textcolor);
imagestring ($im, $font, $x2, $y2, $string2, $textcolor);
imagestring ($im, $font, $x3, $y3, $string3, $textcolor);
imagegif($im);
imagedestroy($im);
?>
link naar de site.
http://84.245.36.27/image...me=1&id1=2&id2=3&league=4
alvast bedankt!
edit: "ik zie dat ik gefaalt ben in de topic een juist naam geven. dit moest zijn [PHP] Imagestring probleem"
ik heb een script geschreven in php om text op een plaatje te zetten.
Nu kan ik alleen $textcolor = imagecolorallocate($im, 0, 0, 255); aanpassen wat ik wil. De text blijft bruin.
Hebben jullie enig idee?
code:
<?php
header ("Content-type: image/gif");
$a = $_GET["fname"];
$b = $_GET["id1"];
$c = $_GET["id2"];
$d = $_GET["league"];
// try changing this as well
$string = $a;
$string2 = $b . "." . $c;
$string3 = $d;
$font = 5;
$im = imagecreatefromgif("protoss.gif");
$x1 = imagesx($im) - 150;
$y1 = imagesy($im) - 90;
$x2 = imagesx($im) - 150;
$y2 = imagesy($im) - 70;
$x3 = imagesx($im) - 150;
$y3 = imagesy($im) - 50;
$backgroundColor = imagecolorallocate ($im, 0, 0, 0);
$textcolor = imagecolorallocate($im, 0, 0, 255);
imagestring ($im, $font, $x1, $y1, $string, $textcolor);
imagestring ($im, $font, $x2, $y2, $string2, $textcolor);
imagestring ($im, $font, $x3, $y3, $string3, $textcolor);
imagegif($im);
imagedestroy($im);
?>
link naar de site.
http://84.245.36.27/image...me=1&id1=2&id2=3&league=4
alvast bedankt!
edit: "ik zie dat ik gefaalt ben in de topic een juist naam geven. dit moest zijn [PHP] Imagestring probleem"
[ Voor 4% gewijzigd door Sporedd op 23-04-2010 01:53 ]
Don't trust an atom, they make up everything.