|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-09-15 18:33 UTC] iliaa@php.net
[2004-05-13 01:35 UTC] areyesa at elektra dot com dot mx
[2004-06-13 21:12 UTC] rombert at go dot ro
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 16:00:02 2025 UTC |
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.