Hi,
I originally tried to do this using imagettftext, but couldn't make text bold (as in my other thread), so I've resigned myself to a still quite useful method.
This time, I've got the image with the text and a black background in the file give.png. I want to switch the black background for a series of lines in alternating colors
<?
$height=30;
$width=130;
header ("Content-type: image/png");
$im = imagecreate ($width, $height);
$black = imagecolorallocate ($im, 0, 0, 0);
$dark = imagecolorallocate ($im, 11, 61, 115);
$light = imagecolorallocate ($im, 145, 168, 249);
$word=imagecreatefrompng("give.png");
//draw the alternating horizontal lines
for ($i=0; $i<$height; $i=$i+2){
imageline ($im, 0, $i, $width, $i, $light);
imageline ($im, 0, $i+1, $width, $i+1, $dark);
}
imagecolortransparent($im,$black);
imagecopy($im,$word,0,0,0,0,130,30);
imagepng ($im);
imagedestroy ($im);
?>
However, this just prints out the give.png,
what's wrong?
Many thanks,
ucbones