I'm writing in C# for WPF. I have a bitmap that I want to blit to the screen. Here's what I'm doing now (which creates a nice blit with white as the transparent color):
// Make backColor transparent for myBitmap.
UnitImageBMP.MakeTransparent(System.Drawing.Color.White);
// Draw myBitmap to the screen.
g.DrawImage(RotatedBMP,
BlueArmy[index].LocationX - (RotatedBMP.Width / 2),
BlueArmy[index].LocationY - (RotatedBMP.Height / 2),
RotatedBMP.Width,
RotatedBMP.Height);
This works fine. But now I want to make the blitted image 'fade' based, presumably, on the alpha channel (actually, I need to create a number of 'fade' steps).
I haven't found this question covered with WPF, bitmap to an image. Any help would be appreciated.
Thanks!
EDIT: Because the effect I'm looking for seems unclear, I found this image. The middle image shows the effect that I'm looking for.