Blur effects on a transparent background leaves a black ghosting effect

If I add a simple UV sphere that emits white light, and in the compositor add a Fast Gaussian blur effect, then when viewing on a transparent background there is a noticeable black halo around the glow.

Any ideas what the correct way to do this is?

It seems to have something to do with the horizon colour being picked up by the blur effect. How do you prevent that from happening? As a work around I can set the horizon colour to white, but I don’t think that’s the correct way to do it…

Here you can see with a red horizon colour, and changing the colour of the emitter to blue the effect is quite pronounced:

you can try use the color ramp to make the background the color you want with the alpha you want, lets say the glow is blue, you put blue on the two ends of the color ramp but in one of them you put the alpha at zero

let me just warn you though, if you are doing some compositing and want to add this as a glow effect you are in for a though ride, because you’ll end up with the same problem when you try overlay it with something else, the only difference is that the background color then will be coming from the “layer” you are trying to overlay with instead of the horizon color (this is in fact the same problem i posted a few threads ago)

Try the following: Blur the image, then convert its alpha mode from premultiplied to straight using convertor -> Alpha Convert.
You can also use the mix node, divide blending mode, blurred image to upper socket and its alpha (you can take it from “Separate RGBA”) to the lower socket. Factor to 1.0.
On its own it looks awful, but when composited over background - it’ll look fine.