How do you change the color of an Image in WPF?

前端 未结 2 1098
我寻月下人不归
我寻月下人不归 2020-12-12 00:13

I have a .png image that\'s just white-on-transparent, and I\'m wondering if there\'s an easy way to make that green-on-transparent, red-on-transparent, etc so I don\'t need

相关标签:
2条回答
  • 2020-12-12 00:42

    Take a look at these CodeProject Articles

    • Image Processing Lab
    • ImageMagic-WPF Image Color Spaces

    Image Processing Lab is a simple tool for image processing, which includes different filters and tools to analyze images available in the AForge.NET framework.

    You could also take a look at the FormatConvertedBitmap, ColorConvertedBitmap or WritableBitmap Class's

    0 讨论(0)
  • 2020-12-12 00:57

    For a simpler solution that doesn't require pulling in huge libraries and lets you understand what's going on under their hood (and thus gives you greater flexibility), learn how to use WPF Pixel Shaders (google it).

    Then you can use something like the multiply shader here: http://rakeshravuri.blogspot.com/2008/08/blending-modes-in-wpf-using.html

    0 讨论(0)
提交回复
热议问题