开发者

Fade image to grayscale in silverlight

开发者 https://www.devze.com 2023-01-15 10:43 出处:网络
I\'m开发者_C百科 using expression blend and can\'t figure out how to go about fading a color image to grayscale. Can I do it in the xaml or do I need to handle this in my C#?Couple ways to do it.

I'm开发者_C百科 using expression blend and can't figure out how to go about fading a color image to grayscale. Can I do it in the xaml or do I need to handle this in my C#?


Couple ways to do it.

1) pre-compute gray-scale image; place it on top of the color image; animate opacity of the gray scale image from 0 to 1 to get the desired effect.

2) use pixel shader. wpf shader library might have one

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号