I'm trying to really simple things with ImageColorTransaprent:
// 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);
I get a really weird set of blobs when the browser opens up the dynamic gif in PhotoEditor. Anyone have an idea?
Cheers
Devang