Reply to Re: Transparency doesn't work under IE, but does under Mozilla

Your name:

Reply:


Posted by Matt Darby on 07/30/05 01:54

Tom Scales wrote:
> 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);
>
>
>
>

IE doesn't support transparent PNG files. Have you attempted outputting
a GIF file with this code instead?

Matt Darby

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация