Skip to main content

Microsoft Silverlight

Answered Question Chroma Keying an image in Silverlight 3.0RSS Feed

(0)

c007
c007

Member

Member

21 points

25 Posts

Chroma Keying an image in Silverlight 3.0

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
Tim Dawson

Participant

Participant

1130 points

218 Posts

Re: Chroma Keying an image in Silverlight 3.0

Why not just create the image with transparency in the first place? You have 8 bits of alpha channel to play with.


Microsoft MVP
Controls for Silverlight, WPF and Windows Forms at http://www.divelements.co.uk

c007
c007

Member

Member

21 points

25 Posts

Re: Chroma Keying an image in Silverlight 3.0

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
sl.ayer

Participant

Participant

850 points

163 Posts

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities