#22323 [Opn->Fbk]: There's no way to output transparent truecolor PNG images
| From: | sniper@php.net | Date: | Thu, 20 Feb 2003 13:30:49 +0000 |
| Subject: | #22323 [Opn->Fbk]: There's no way to output transparent truecolor PNG images | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-33675@lists.php.net to get a copy of this message | ||
ID: 22323
Updated by: sniper@php.net
Reported By: jukkaho at mail dot student dot oulu dot fi
-Status: Open
+Status: Feedback
Bug Type: GD related
Operating System: Linux
PHP Version: 4.3.0
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2003-02-20 04:24:57] jukkaho at mail dot student dot oulu dot fi
Alpha channel in a truecolor image is only sent when im->saveAlphaFlag
is true.
It is by default set to false in gdImageCreateTrueColor() and there are
no callers to gdImageSaveAlpha() to set it to any other value.
I tested a hack where I call gdImageSaveAlpha() in
PHP_FUNCTION(imagealphablending) and it worked mostly as expected. I'd
guess that another function call is needed unless is it made to default
behaviour and calls are embedded in PHP_FUNCTION(imagepng) etc.
Only weird things that occured were that for some reason, target image
alpha channel is discarded when blending other images to it.
For example when blending fully transparent part over another fully
transparent part resulted in a white area. White comes from destination
image that's transparent too.
Maybe I should open another bug for it?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22323&edit=1