0

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. enter image description here

zetar
  • 1,225
  • 2
  • 20
  • 45
  • _transparency based on alpha_ As Alpha __is__ the transparency your question is quite unclear.. – TaW May 07 '16 at 17:26
  • I want the blitted image to be faded; perhaps using a ColorMatrix? Blending the image with background to some extent. – zetar May 07 '16 at 18:03

0 Answers0