Bug #50183 [Asn]: PNG alpha blending doesn't seem to work

From: Date: Mon, 23 Jan 2017 14:06:54 +0000
Subject: Bug #50183 [Asn]: PNG alpha blending doesn't seem to work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-206891@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=50183&edit=1 ID: 50183 Updated by: cmb@php.net Reported by: scratch65535 at att dot net Summary: PNG alpha blending doesn't seem to work Status: Assigned Type: Bug Package: GD related Operating System: * PHP Version: * Assigned To: pajoye Block user comment: N Private report: N New Comment: The images are not available anymore, so I can't exactly reproduce the issue. However, imagecopymerge() is supposed to *emulate* alpha by means of the $pct parameter. For instance, $pct==50 means that all pixels of the $src_im will be treated as if their alpha channel would be 50% (i.e. 64). In your case, you likely will want to set `alphablending($dest, false)` and use imagecopy() instead of imagecopymerge(). For more complex cases where $pct!=100 see my comment on bug #23815. As the documentation of imagecopymerge() is obviously not clear enough, I'm changing to doc bug. Previous Comments: ------------------------------------------------------------------------ [2009-11-23 19:25:14] pajoye@php.net It looks to me to be a misusage for imagecopymerge. I have to test with your code to be sure. move to assigned. ------------------------------------------------------------------------ [2009-11-23 14:42:28] scratch65535 at att dot net I'm confused. The status shows as "no feedback" in r/o mode, but "open" in edit mode. I don't know what feedback was/is expected - as far as I'm aware, it's an open problem. Am I expected to post another comment every week to keep it open, or what? ------------------------------------------------------------------------ [2009-11-23 01:00:02] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2009-11-15 18:29:52] scratch65535 at att dot net So the documentation is broken then? "The two images will be merged according to pct which can range from 0 to 100. 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. " ------------------------------------------------------------------------ [2009-11-15 18:26:39] scratch65535 at att dot net UGH! I just did another test using a more sophisticated image (semi-transparent pixels) and "GIF mode" doesn't work for what I want. It seems possible that imageCopyMerge() might be the culprit here or at least one of them, because if I call imagePNG on the $src, I don't get the white background color. ------------------------------------------------------------------------ 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=50183 -- Edit this bug report at https://bugs.php.net/bug.php?id=50183&edit=1

« previous php.bugs (#206891) next »