在OSX上的C ++中捕获屏幕图像 [英] Capture Screen Image in C++ on OSX

查看:146
本文介绍了在OSX上的C ++中捕获屏幕图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法以编程方式截取Mac上当前屏幕显示的屏幕截图(或以某种方式访问​​图片)?

Is there a way to programatically take a screenshot (or somehow get access to an image) of the current screen display on a mac?

不是Objective-C。

Preferably, in C++, not Objective-C.

推荐答案

这是一个示例代码,它是C,但它已被弃用。

Here is a sample code that does it is C, however it is deprecated.

还可以修改

Also chech out glGrab which uses OpenGL to grab the screen and is very fast.

还有这个 /www.cocoadev.com/index.pl?ScreenShotCode\"> CocoaDev线程,它有许多实现,都是Objective-C和C ++。

And there is this CocoaDev thread which has numerous implementations, both is Objective-C and C++.

这篇关于在OSX上的C ++中捕获屏幕图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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