I made a convolution testing program for experimenting with stuff. I've created a 5x5 Gaussian kernel for blurring. Everything looked fine, then I tried to blur a transparent png with a white circle in the middle. On the blurred image, the edge looks like a gradient from white to black.This is mathematically correct, because the transparent points are treated as black, transparent pixels, so the convolution should gradually give darker colors near the edge.But if I do a gaussian blur on the same image e.g. in GIMP, the circle will be fully white, with gradually more transparency toward the edges. I'd like to get this effect. What am I missing?If I set the transparent pixels to transparent white, it'll work, but only if the blurred color is white.This is the original image:This is the result I get if I left the transparent pixels on default:And if I set the transparent pixels to #00FFFFFF, I'll get this (this is the intended IF the blurred color is white)
Gaussian blur with transparency
texture
As it turned out, I forgot to weight the color channel by the transparency, so I got the same issue as written here:Blur Transparency Bug