C#: Draw one Bitmap onto Another, with Transparency

前端 未结 3 597
天涯浪人
天涯浪人 2021-02-05 07:13

I have two Bitmaps, named largeBmp and smallBmp. I want to draw smallBmp onto largeBmp, then draw the result onto the screen. SmallBmp\'s white pixels should be transparent. Her

3条回答
  •  半阙折子戏
    2021-02-05 07:31

    CompositingMode.SourceCopy is the problem here. You want CompositingMode.SourceOver to get alpha blending.

提交回复
热议问题