在正在播放的视频上方显示透明图像 [英] Show a transparent image top of a running video

查看:73
本文介绍了在正在播放的视频上方显示透明图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VS10并使用axWindowsMediaPlayer1播放视频,并希望在其上面显示透明图像(即我可以在图片框区域看到视频,这是我的代码).

I am working on VS10 and using axWindowsMediaPlayer1 for playing video and want to show a transparent image on top of it (i.e. i could see the video in the area of picturebox here is my code).

axWindowsMediaPlayer1.Controls.Add(pictureBox1);
        pictureBox1.BringToFront();
        pictureBox1.Image = new Bitmap(@"path");




通过使用此代码,我可以在视频的前面看到图像(即透明),但是由于它是透明的,所以它在Picturebox区域中显示了表单的背景.请有人帮帮我.




by using this code i am able to see image(i.e. transparent) in-front-of video but as it is transparent it shows the background of form in the area of picturebox. please somebody help me out.

推荐答案

我完全不建议在System.Windows.Forms中解决此问题.这是如此困难,以至于不值得付出努力.简而言之,您需要使用DirectX 叠加层叠加层引擎.

同时,就WPF而言,这根本不是问题,因为其库的本质是基于DirectX的,与Windows几乎没有关系.根据定义,所有UI元素可以是透明的,任何内容都可以放置在视频之上.完全不需要额外的努力.

—SA
I would not advice solving this problem in System.Windows.Forms at all. This is so difficult that it does not worth the effort. For short, you would need to use DirectX overlays, overlay engine.

At the same time, with WPF this is not a problem at all, by the very nature of its library which is itself based on DirectX and has very little to do with Windows. All UI elements can be transparent, anything can be placed on top of video, by definition. Absolutely no extra effort is required.

—SA


这篇关于在正在播放的视频上方显示透明图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆