Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Chroma Keying an image in Silverlight 3.0
3 replies. Latest Post by sl.ayer on March 25, 2009.
(0)
c007
Member
21 points
25 Posts
03-25-2009 4:07 PM |
I have an Image created using the WriteableBitmap Render method.
Now, I have to make a specific color on that image to be transparent.
Does anybody have a sample of how can I do this with the ShadeEffect class or otherwise?
Thank you!
Tim Dawson
Participant
1130 points
218 Posts
03-25-2009 7:12 PM |
Why not just create the image with transparency in the first place? You have 8 bits of alpha channel to play with.
03-25-2009 7:20 PM |
The Image is created from an arbitrary UIElement in real time, using the exact same colors as in the UIElement. Once the image is created, I need to do a second pass and change all pixels of a given color to be transparent.
Any ideas of how to do that?
sl.ayer
850 points
163 Posts
03-25-2009 8:06 PM |
http://blogs.msdn.com/jstegman/archive/2009/03/23/chroma-key-pixel-shader-sample.aspx