• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to capture my desktop?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to capture my desktop?


  • Subject: Re: How to capture my desktop?
  • From: Nicko van Someren <email@hidden>
  • Date: Mon, 26 Feb 2007 16:07:18 +0000

On 26 Feb 2007, at 15:13, Michael Watson wrote:

You can use NSTask to invoke /usr/sbin/screencapture, which can dump the screen to disk. Then go nuts with the resulting image.

On 26 Feb, 2007, at 16:15, Henry Joseph W wrote:

Hi All.
My purpose is very simple:I want to capture my desktop to generate an image, then do some stuff to it.

In fact there is no need to send it to a file; you can send it to the clipboard:


NSArray *args = [NSArray arrayWithObjects: @"screencapture", @"- Sct", @"tiff", nil];
[[NSTask launchedTaskWithLaunchPath: @"/usr/sbin/screencapture" arguments: args] waitUntilExit];
NSImage *i = [[[NSImage alloc] initWithPasteboard: [NSPasteboard generalPasteboard]] autorelease];


Cheers,
	Nicko



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How to capture my desktop?
      • From: Joar Wingfors <email@hidden>
References: 
 >How to capture my desktop? (From: Henry Joseph W <email@hidden>)
 >Re: How to capture my desktop? (From: Michael Watson <email@hidden>)

  • Prev by Date: Re: How to capture my desktop?
  • Next by Date: Re: How to capture my desktop?
  • Previous by thread: Re: How to capture my desktop?
  • Next by thread: Re: How to capture my desktop?
  • Index(es):
    • Date
    • Thread