Re: Capture screen in Cocoa
Re: Capture screen in Cocoa
- Subject: Re: Capture screen in Cocoa
- From: "hackmiester (Hunter Fuller)" <email@hidden>
- Date: Tue, 5 Sep 2006 11:35:18 -0500
On 2 September 2006, at 09:16, Shawn Erickson wrote:
On Sep 1, 2006, at 6:06 PM, Alexander Cohen wrote:
Is there a way to capture an image of the screen from Cocoa?
Not sure of exactly your screen capture needs but all of the
solutions recommended to you so far are slow and/or use private
API. The fastest way to capture pixels from the screen is to use a
simple OpenGL and CGL set of commands.
Or you could use screencapture, but that's a bit of a hack. Man
screencapture in terminal for information.
Review <http://lists.apple.com/archives/Quartz-dev/2006/Apr/
msg00088.html>
Note you can improve on the code sample by using vImage to reflect
the image, pulling context creation and configuration out of the
grab function (if you are going to grab often), etc. You can also
capture to a buffe that you can use with NSImage, etc. as you see fit.
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40hackmiester.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden