Sorry if this is a duplicate, my original post did not show up.
I'm trying to use ImageColorTransparent, but without much luck. When I try to use it with png's, the image just shows up as weird blobs of color. With jpeg's, the function does not seem to have any effect at all. I'm including some basic code:
// send header
Header("Content-Type: image/jpeg");
// create image and colours
$im = ImageCreate(150, 15);
$red = ImageColorAllocate($im, 255, 0, 0);
$black = ImageColorAllocate($im, 0, 0, 0);
$white = ImageColorAllocate($im, 255, 255, 255);
$blue = ImageColorAllocate($im, 0, 0, 255);
$trans=ImageColorTransparent($im,$blue);
ImageFill($im,0,0,$trans);
// write string at (0,0) in white
ImageString($im, 2, 0, 0, "hello", $white);
// release image
ImageJPEG($im);