|
Posted by Tom Scales on 07/29/05 16:52
I am trying to get transparency to work, for a number of functions on my
website. The code works flawlessly under Mozilla, but doesn't become
transparent under IE.
The code below is just a snippet, as I copy an image into a portion of it
(trying to make a drop shadow).
It's perfectly transparent under Mozilla, but not at all under IE -- the
color shows up!
Any suggestions?
Tom
header("Content-type: image/png");
// create the image
$om = imagecreatetruecolor($newwidth + 4, $newheight + 4);
$tfill = imagecolorallocate($om, 120, 121, 122); // gray
color unlikely to be used
//create the rectangle with the transparency color
imagefilledrectangle($om, 0, 0, $newwidth + 4, $newheight + 4, $tfill);
// fill it
// make it transparent
imagecolortransparent($om, $tfill); // make that transparent
// display it
imagepng($om);
imagedestroy($om);
Navigation:
[Reply to this message]
|