I want to overlay some text onto a loaded image, but when I do, it comes out gray no matter what color I tell it to be.
Here's my code:
<?php
$image=imageCreateFromJpeg("bgregsmiling.jpg");
$white=imageColorAllocate($image,255,255,255);
$red=imageColorAllocate($image,255,0,0);
$green=imageColorAllocate($image,0,255,0);
$black=imageColorAllocate($image,0,0,0);
$blue=imageColorAllocate($image,0,0,255);
imageString($image,5,40,40,"Greg", $red);
imagejpeg($image);
imageDestroy($image);
?>
I appreciate any help!