Alpha masking in c# System.Drawing?

Viewed 9759

I'm trying to draw an image, with a source Bitmap and an alpha mask Bitmap, using the System.Drawing.Graphics object. At the moment I loop X and Y and use GetPixel and SetPixel to write the source color and mask alpha to a third Bitmap, and then render that. However this is very inefficient and I am wondering if there is an faster way to achieve this?

The effect I'm after looks like this:

Effect I’m after

The grid pattern represents transparency; you probably knew that.

2 Answers
Related