Build a mask

Hi everybody,

I intend to do following but no idea has come across my mind yet.

b) build an opaque mask
c) control the transparency (alpha channel) of the mask in an arbitrary point of the mask according to a 2D Gaussian profile. That is, the alpha channel of the mask should smoothly go from min = 0 = fully transparent (in the center of the Gaussian) to max = 1 = fully opaque (outside the Gaussian).
e) once the punctured mask is built, apply it to the previously loaded image

The point is: I don’t know how to build 2D Gaussian mask, make it work on alpha channel and then how to apply it on the image.

Any idea?
Thanks a lot

please don’t cross post.