Edit report at https://bugs.php.net/bug.php?id=23815&edit=1
ID: 23815
Comment by: cleggmatt at gmail dot com
Reported by: bjorn at smokingmedia dot com
Summary: imagecopymerge doesn't respect alpha-channel in
PNG-24 file
Status: Assigned
Type: Feature/Change Request
Package: GD related
Operating System: Linux pluto 2.4.18lvm-r1
PHP Version: 5.2.9
Assigned To: pajoye
Block user comment: N
Private report: N
New Comment:
Good idea. Added as an extra function and created a pull request on github
https://github.com/php/php-src/pull/211
Previous Comments:
------------------------------------------------------------------------
[2010-05-06 06:44:55] setvik at gmail dot com
I have the same need to merge alpha images with the opacity of the top one
reduced, and like the others in this thread, I assumed imagecopymerge would
respect the alpha settings in the image. Based on comments here and in the docs
( http://php.net/manual/en/function.imagecopymerge.php), others are making the
same assumption.
@pajoye - The inclusion of alpha support whether in imagecopymerge or an
additional function would be very valuable for working with images, especially
watermarks with complex transparency. Any chance imagecopymerge can be patched
to support this? Or should an additional function be written and the
documentation for imagecopymerge updated?
What's your take?
------------------------------------------------------------------------
[2009-12-10 18:35:56] andre at webkr dot de
Ah, I see. It's imagecopy() which implements alpha transparency while
imagecopymerge() does not.
------------------------------------------------------------------------
[2009-12-10 18:23:20] andre at webkr dot de
So what does the "it implements alpha transparency for true colour images" in
"When pct = 0, no action is taken, when 100 this function behaves identically
to imagecopy() for pallete images, while it implements alpha transparency for
true colour images." mean anyway?
------------------------------------------------------------------------
[2009-07-20 12:10:43] steve at redmonkey dot org
Thanks, understood. Although, I do think it would be a useful feature, perhaps
there's scope for an 'imagecopymergealpha' type function in the future?
------------------------------------------------------------------------
[2009-07-20 08:43:04] [email protected]
imagecopymerge was not meant to support the alpha channel but to emulate it via
pct. It was also not meant to use both the alpha or the pct value to blend an
image over another.
------------------------------------------------------------------------
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
https://bugs.php.net/bug.php?id=23815
--
Edit this bug report at https://bugs.php.net/bug.php?id=23815&edit=1