我是靠谱客的博主 朴素花瓣,这篇文章主要介绍GDI+屏幕截图(directx、dxgi)GDI+ 、directx、dxgi => 我认为这就是一个东西,因为运行起来,硬件消耗特别低,直接代码:,现在分享给大家,希望可以做个参考。
GDI+ 、directx、dxgi => 我认为这就是一个东西,因为运行起来,硬件消耗特别低,直接代码:
复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37private void button1_Click(object sender, EventArgs e) { System.Threading.Thread thread = new System.Threading.Thread(ThreadMethod); thread.Start(); } private void ThreadMethod() { Image bt = new System.Drawing.Bitmap(c.Bounds.Width, c.Bounds.Height); Graphics g = Graphics.FromImage(bt); try { for (int a = 0; a < 3000; a++) { g.CopyFromScreen(0, 0, 0, 0, c.Bounds.Size, CopyPixelOperation.SourceCopy); // var i = copyscreen(); //pictureBox1.Image = bt; Console.WriteLine(1); System.Threading.Thread.Sleep(10); } g.Dispose(); } catch (Exception _e) { g.Dispose(); System.Threading.Thread.CurrentThread.Abort(); } } Image copyscreen() { Image bt = new System.Drawing.Bitmap(c.Bounds.Width, c.Bounds.Height); Graphics g = Graphics.FromImage(bt); g.CopyFromScreen(0, 0, 0, 0, c.Bounds.Size, CopyPixelOperation.SourceCopy); g.Save(); g.Dispose(); return bt; }
最后
以上就是朴素花瓣最近收集整理的关于GDI+屏幕截图(directx、dxgi)GDI+ 、directx、dxgi => 我认为这就是一个东西,因为运行起来,硬件消耗特别低,直接代码:的全部内容,更多相关GDI+屏幕截图(directx、dxgi)GDI+内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复