Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am working with a directX application with WPF, I am facing a problem with videos and images that contains transparent pixels, I have to draw a color in background an then a video/image over it. What I expect is background color should be visible while playing video only non transparent pixels should be visible but what I get is a black background behind the video. I am using following settings on device to achieve alpha blending :

device.RenderState.SourceBlend = Blend.SourceAlpha; device.RenderState.DestinationBlend = Blend.InvSourceAlpha; device.RenderState.AlphaBlendEnable = true;

What am I missing here? What is the best approach to handle transparent videos? Any help will be of great value to me.

share|improve this question
1  
I highly doubt that any video codec supports transparent pixels. –  r2d2rigo Jul 6 '12 at 8:07
    
r2d2rigo : My video is .mov file and after a quick google search I found that .mov supports transparency/ alpha. I didn't found any reliable source yet that can confirm this, but I am pretty sure that .mov supports it. –  Vibhore Tanwer Jul 6 '12 at 10:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.