Bug #34992 [Asn->Fbk]: imageconvolution does not respect alpha

From: Date: Wed, 06 May 2015 22:57:37 +0000
Subject: Bug #34992 [Asn->Fbk]: imageconvolution does not respect alpha
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-192540@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=34992&edit=1

 ID:                 34992
 Updated by:         cmb@php.net
 Reported by:        jaanus at underwerks dot com
 Summary:            imageconvolution does not respect alpha
-Status:             Assigned
+Status:             Feedback
 Type:               Bug
 Package:            GD related
 Operating System:   Linux 2.6.13
 PHP Version:        6CVS-2005-10-26 (snap)
 Assigned To:        pajoye
 Block user comment: N
 Private report:     N

 New Comment:

Just as jcolby said: using imagesavealpha() to save the alpha
channel should be sufficient.


Previous Comments:
------------------------------------------------------------------------
[2009-03-26 17:52:30] jcolby at remove dot this dot acsol dot net

The fix to this:

In reference functions I manged to pinpoint a duplicate problem and solution, the destination
resource image internal to the imageconvolution function needs to have the imagesavealpha flag set
to true or equivalent after creation. Thats all this needs to be resolved.

imagesavealpha($resource, true);

------------------------------------------------------------------------
[2007-10-30 07:50:19] michael dot buckley at ozemail dot coml dot au

I am trying to make slightly blurred drop shadows for some text, but since I then need to layer it
over the top of another image it needs to keep the alpha layer.

Right now I am using a color to alpha function to undo this effect, but it is slow.

Any one working on this?

------------------------------------------------------------------------
[2007-08-06 10:01:48] pajoye@php.net

By the way, I suppose it is a typo but you are using the jpeg functions to load and save PNG. It is
not going to work (and jpeg has no alpha support).

"This bug still occurs with 5.2.2 which is fairly new."

What make you think that anything has changed regarding this behavior?

In the meantime, I figured out the source of the problem. Feedback > open.



------------------------------------------------------------------------
[2007-08-06 09:32:34] ghosh at q-one dot com

This bug still occurs with 5.2.2 which is fairly new. Can't test 5.2.3 right now but it doesnt
mention anything about imageconvolution in the changelog so I believe this is still unfixed.

The original post about "background color" is a little bit misleading.
To put it more simply: Any alpha channel information simply gets destroyed when using
imageconvolution. An example image isnt really necessary because it happens with ANY png with alpha
channel. I can provide one on request if absolutely necessary though.

Use cases? For instance I have a dynamically generated price tag here as alpha png. I rotate it with
imagerotate. Rotation makes it somewhat blurry. So afterwards I try sharpening it with
imageconvolution. There you go: Alpha channel info goes down the drain...

------------------------------------------------------------------------
[2005-11-03 01:00:07] 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".

------------------------------------------------------------------------


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=34992


--
Edit this bug report at https://bugs.php.net/bug.php?id=34992&edit=1


Thread (10 messages)

« previous php.bugs (#192540) next »