#25540 [Opn->Bgs]: Transparency is not working
| From: | iliaa@php.net | Date: | Mon, 15 Sep 2003 22:33:51 +0000 |
| Subject: | #25540 [Opn->Bgs]: Transparency is not working | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-47604@lists.php.net to get a copy of this message | ||
ID: 25540
Updated by: iliaa@php.net
Reported By: guido at comlog dot nl
-Status: Open
+Status: Bogus
Bug Type: GD related
Operating System: W2K
PHP Version: 4.3.3
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.
Thank you for your interest in PHP.
You are probably using a browser Internet Explorer that does not
support tranparency in png correctly. The generated image works fine in
Mozilla on Win32 and *NIX.
Previous Comments:
------------------------------------------------------------------------
[2003-09-15 05:23:11] guido at comlog dot nl
Description:
------------
Transparency is not working on PNG files on W2K.
I've tried a few background colors, different formats, but can't get it
working.
Reproduce code:
---------------
<?php
// Example demonstrating a transparent truecolor png bug
// fixed by the time of gd 2.0.11, but not fixed in php's
// bundled gd.
header("Content-type: image/png");
$image = imageCreateTruecolor(640, 100);
$transparent = imageColorAllocate($image, 0, 0, 0);
$red = imageColorAllocate($image, 255, 50, 50);
imageColorTransparent($image, $transparent);
imageFilledRectangle($image, 0, 0, 640-1, 100-1, $transparent);
imageString($image, 3, 0, 0, "If the background is black, and you
aren't on win32 IE (buggy png code), this is a bug.", $red);
imagePng($image);
?>
Expected result:
----------------
The code should produce a white PNG image with red text.
Actual result:
--------------
The code produces a black PNG image with red text. The background is
NOT transparent.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=25540&edit=1