ID: 34992 Comment by: jcolby at remove dot this dot acsol dot net Reported By: jaanus at underwerks dot com Status: Assigned Bug Type: GD related Operating System: Linux 2.6.13 PHP Version: 6CVS-2005-10-26 (snap) Assigned To: pajoye New Comment:
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); Previous Comments: ------------------------------------------------------------------------ [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] paj...@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". ------------------------------------------------------------------------ [2005-10-26 14:52:28] paj...@php.net Please provide the images you use for this test and images you like to have as result (specifying which software you use). I'm not sure about the use of alpha with convolution filter but aesthetic toys. Interpolate the alpha using the convolutions make little sense, what it does now is to get the src alpha value for a given result pixel (x,y). As a second point, you talk about background color, this is something different as the alpha channel for a given pixel. ------------------------------------------------------------------------ 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/34992 -- Edit this bug report at http://bugs.php.net/?id=34992&edit=1