#39273 [Bgs->Csd]: imagecopyresized() not compatable with alpha channel
| From: | pajoye@php.net | Date: | Sat, 04 Nov 2006 02:26:47 +0000 |
| Subject: | #39273 [Bgs->Csd]: imagecopyresized() not compatable with alpha channel | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-104363@lists.php.net to get a copy of this message | ||
ID: 39273
Updated by: pajoye@php.net
Reported By: seth at pricepages dot org
-Status: Bogus
+Status: Closed
Bug Type: GD related
Operating System: Mac 10.4
PHP Version: 5.1.6
Assigned To: pajoye
New Comment:
It will be available in 5.2.1 or later. Thanks for the reproduce
script.
Previous Comments:
------------------------------------------------------------------------
[2006-10-28 15:26:28] seth at pricepages dot org
I'm American; if I'm exposed to more than one language my head
explodes. ;)
Yep, that image is exactly what I'm looking for.
Thanks for not just ignoring me after marking the bug bogus,
I've had that happen also...
------------------------------------------------------------------------
[2006-10-28 15:14:41] pajoye@php.net
Sorry for my bad wording (images "speak" better), but we are getting
somewhere, finally. We were talking of two different problems. I was
talking about a common misunderstanding and you about a more specific
problem. Thanks to have insisted and nice catch :)
Check this image:
http://blog.thepimp.net/misc/39273_out.png
Is it what you expect?
------------------------------------------------------------------------
[2006-10-28 14:43:21] seth at pricepages dot org
translucide (French) = translucent (English)
Sorry, that confused me for a bit.
"Boolean transparency" means that the pixel is either fully
transparent, or fully opaque. Never partially transparent.
The area outside of the line is fine, it should be
transparent and it is in your image. This is correct.
What is suffering from "boolean transparency" are the edges
of the line. For example:
In your example script, one alpha value was 63, and the
other was 127. In your output PNG, those values have been
changed to 0 and 127.
I should mention that if you are using Microsoft's Internet
Explorer version 6 or less, a PNG image will display with
boolean transparency due to a bug in the browser. So you
won't be able to see the difference. Use FireFox.
------------------------------------------------------------------------
[2006-10-28 14:19:46] pajoye@php.net
Pardon? What is a boolean transparency?
Please understand these three things:
- The transparent color is one *color*, an index for palette based
image or 32bits value for truecolor images. It defines which color is
used as the *background* color (like white is the background color of
a white paper).
- The *alpha* channel of a pixel defines how translucide the pixel has
to be. It has nothing to do with the transparent color.
- Your image has *no* transparent color but many pixels with various
*alpha* levels.
Load the result images in your favourite paint programs to see what I
mean. The area outside the line is translucide, it is due to the alpha
channel.
------------------------------------------------------------------------
[2006-10-28 14:11:56] seth at pricepages dot org
But that has one of the bugs that I pointed out: boolean
transparency. The original doesn't have that problem.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/39273
--
Edit this bug report at http://bugs.php.net/?id=39273&edit=1