Find Jobs
Hire Freelancers

data entry work

₹12500-37500 INR

已关闭
已发布将近 9 年前

₹12500-37500 INR

货到付款
How to take an image snapshot of the screen on Mac OS X Lion Q: How do I take an image snapshot of the screen on Mac OS X Lion? A: On Mac OS X Lion, the way to make an image snapshot from the screen is by employing Quartz Display Services. Important: This Q&A describes how to capture static images. If you want to capture real-time videos of screen activity, you should use AV Foundation instead. See How to capture screen activity to a movie file using AV Foundation on OS X 10.7 Lion and later for more information. Make sure you add the ApplicationServices framework in your Xcode project and import the ApplicationServices/ApplicationServices.h header file. Given a display ID (of CGDirectDisplayID type), you can call CGDisplayCreateImage to create a CGImage from the entire screen or CGDisplayCreateImageForRect from a rectangular portion of it. If you always capture from the main display, you may simply pass kCGDirectMainDisplay to either function as shown in Listing 1. It is a shorthand for specifying the current main display. If you might capture from a secondary display, then you can go through the list of active displays returned from CGGetActiveDisplayList and find the one you want to capture. See Listing 2 for an example. Listing 1 Creating an image from the entire main display CGImageRef image = CGDisplayCreateImage(kCGDirectMainDisplay); Listing 2 Creating images from multiple displays CGDisplayCount displayCount; CGDirectDisplayID displays[32]; // grab the active displays CGGetActiveDisplayList(32, displays, &displayCount); // go through the list for (int i=0; i<displayCount; i++) { // make a snapshot of the current display CGImageRef image = CGDisplayCreateImage(displays[i]); // do something with the snapshot image } Check out the dedicated sample code, ScreenSnapshot, for more information. It demonstrates how to use Quartz Display Services to obtain an image containing the contents of any of the connected displays and allows the user to save the image to a file on disk. Document Revision History Date Notes 2011-08-10 Corrected a link. Added information about the ScreenSnapshot sample. 2011-05-13 New document that shows how to take an image snapshot of the screen on Mac OS X Lion
项目 ID: 7897632

关于此项目

3提案
远程项目
活跃9 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
3威客以平均价₹22,962 INR来参与此工作竞价
用户头像
A proposal has not yet been provided
₹13,333 INR 在15天之内
0.0 (0条评论)
0.0
0.0
用户头像
A proposal has not yet been provided
₹27,777 INR 在10天之内
0.0 (0条评论)
0.0
0.0
用户头像
A proposal has not yet been provided
₹27,777 INR 在10天之内
0.0 (0条评论)
0.0
0.0

关于客户

INDIA的国旗
India
0.0
0
会员自5月 5, 2015起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。