GNOME Bugzilla – Bug 105496
Incorrect RGBA resampling in Lighting Effects plug-in
Last modified: 2004-12-22 21:47:04 UTC
If two pixels have different opacity values (alpha channel), then their colors are not averaged correctly by the Lighting Effects plug-in. It looks like the RGB channels are resampled without taking the opacity into account. As a result, the (invisible) color of a transparent pixel can bleed into an opaque pixel. The resulting image is incorrect. See bug #70335 for some test images and a longer description of the problem. This problem affects many other tools and plug-ins.
Easily confirmed with 1.2.4-pre2, using the default settings in the plug-in with the image test2.xcf.gz that I supplied in bug #70335. The interesting thing is that the preview seems to work correctly, but the final result is wrong. Also, the result is different if you check "create new image" or not. This difference seems to suggest that the plug-in does not deal with transparency correcly - not only when averaging pixels, but also when creating a new image. It looks like we have more than one bug here...
The solution depends on how bug #105577 will be resolved, because most of the problems are burried in gimp_bilinear_rgba ().
2003-02-18 Sven Neumann <sven@gimp.org> Applied patches from David Necas <yeti@physics.muni.cz> that fix incorrect RGBA resampling in a number of plug-ins: * libgimpcolor/gimpbilinear.c (gimp_bilinear_rgba): fixes RGBA resampling in Map Object and Lighting Effects plug-ins (#72876 and #105496). * plug-ins/common/curve_bend.c: fixes bug #72863. * plug-ins/common/deinterlace.c: fixes bug #72856. * plug-ins/common/gauss_iir.c: fixes bug #72848. * plug-ins/common/gauss_rle.c: fixes bug #72849. * plug-ins/common/iwarp.c: fixes bug #72865 (except preview, see comment). * plug-ins/common/mblur.c: fixes bug #72850. * plug-ins/common/pixelize.c: fixes bug #72851. * plug-ins/common/polar.c: fixes bug #72866. * plug-ins/common/ripple.c: fixes bug #72868.