ID: 34131 Updated by: [EMAIL PROTECTED] Reported By: mtjo at conninc dot com -Status: Assigned +Status: Feedback Bug Type: GD related Operating System: * PHP Version: 5CVS-2005-08-15 Assigned To: pajoye New Comment:
They do not, as in many cases the destination pixels are computed using many source pixels. Filters are used to process photographies, graphs or scans, or for some artistic effects. I'm not sure of the right solution to this problem, but the transparent color has nothing to do with colors with a transparency channel. Third problem, the php_gd has more bugs fixed than the official GD 2.0.33. From a features point of view only the animated are missing. The filters do not exist in the official GD. What's your solution to solve the transparency problems? Background color can be easily fixed, as we do in imagerotate. Previous Comments: ------------------------------------------------------------------------ [2005-08-16 14:56:08] mtjo at conninc dot com Actually, it is becoming apparent that it is hit or miss depending on the actual image whether you can accurately set the transparent index on an image using the image filters. They obviously do not handle transparency natively. ------------------------------------------------------------------------ [2005-08-16 06:56:40] mtjo at conninc dot com Forgot to add, here are the examples to reproduce the correct image outputs. http://mike.aplosmedia.com/dev/test_gif/test_gif.php ------------------------------------------------------------------------ [2005-08-16 06:54:47] mtjo at conninc dot com After further testing, I found that pngs will also produce the artifact. After playing around with the code, I came up with two methods to correctly reproduce the transparency in both png and gif images. For the gifs, I do the filtering, save as a temp png file, create a new png file, set transparent then save as gif. The png required that I determine a color not in the source images palette and set that as the background to be set as transparent. If you can point me to a more efficient method for these, I'm all ears. IMO, the prob is with the limitation and inferiority of the gif format and probably there is something in the gd lib affecting this too. I hope this helps in some way. ------------------------------------------------------------------------ [2005-08-16 02:32:06] mtjo at conninc dot com The following link demonstrates the problem. This is on a RH server running PHP5.04. http://mike.aplosmedia.com/dev/brightness/test_brightness.php ------------------------------------------------------------------------ [2005-08-16 02:20:41] [EMAIL PROTECTED] Please provide the sources images, the result images (what you get) and the result you may expect (approximativally). Please use the bundled GD only, your php must be compiled using "--with-gd" not --with-gd=/... Using Gif as output of a filtered image will reduce the quality of any filter... ------------------------------------------------------------------------ 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/34131 -- Edit this bug report at http://bugs.php.net/?id=34131&edit=1