Comment 0 for bug 501873

Revision history for this message
Timo Honkasalo (timo-honkasalo) wrote :

Possibly related to Bug #194928, but to me it seems that the error is produced somewhere after reading the background buffer (since the bug report didn't include a screenshot, I can't tell if my bug looks similar). Also, I have noticed this affects more filters than only the displacement map.

A sample SVG file illustrates the problem. On layer 1 there are some shapes. On layer 2 there is a green circle object to which several filter effects can be applied (open the filter effects dialog and you'll see them). Each filter takes the background image, applies an effect to it and composites it with the source alpha to cut the effect to the shape of the circle. The filters are named after the effect they use.

If you try the filters you'll notice that only color matrix, blend and lighting effects render properly. Gaussian blur, displacement map, offset, morphology and convolution matrix produce ugly rendering artifacts. In gaussian blur the rendering is continuous but it seems like it's rendered in blocks, but the blocks are misaligned. In other effects, there are blocky gaps in the rendered output (although in convolution matrix the gaps are only few pixels wide, I've added a desaturation color matrix to make them more apparent). For effects other that Gaussian blur, using background alpha produces similar artifacts. The bug also appears when exported to bitmap.

When using Gaussian blur, the edges of the artifacts are sharp, which suggests that the error is produced after the blurring. Also, when a displacement map effect is preceded with a color matrix that adds 1 to the alpha values, making sure that the source to the displacement includes no transparent pixels, gaps still appear in the final output. All this implies that the original background image is copied correctly, and the error appears at a later stage.

I think it might be noteworthy that in color matrix and blend, which are working, the value of an output pixel only depend on the value of the source pixel at the same location, while the broken effects use also other source pixels. The lighting effects also use neighbouring pixel values though, but they only use the alpha channel values.