screencapture

Capture an image of the whole, or part of the screen.

Syntax
       screencapture [options] [file]

Key -c Force screen capture to go to the clipboard. -C Capture the cursor as well as the screen. Only allowed in non-interactive modes. -i Capture screen interactively, by selection or window. The con- trol key will cause the screen shot to go to the clipboard. The space key will toggle between mouse selection and window selec- tion modes. The escape key will cancel the interactive screen shot. -m Only capture the main monitor, undefined if -i is set. -M Open the taken picture in a new Mail message. -o In window capture mode, do not capture the shadow of the window. -P Open the taken picture in a Preview window. -s Only allow mouse selection mode. -S In window capture mode, capture the screen instead of the window. -t Image format to create, default is png (other options include pdf, jpg, tiff and other formats). -T Take the picture after a delay of , default is 5. -w Only allow window selection mode. -W Start interaction in window selection mode
-x Do not play sounds
file Where to save the screen capture, 1 file per screen.

Examples

Take a screen shot of the DVD player (where the normal keyboard shortcuts won't work)

$ screencapture -i ~/Desktop/dvd.png

The mouse will turn into crosshairs, hit the space bar for camera mode, now click the window the DVD is playing in.
A file called "dvd.png" will appear on your desktop.

To capture screen content while logged in via ssh, you must launch screencapture in the same mach bootstrap hierarchy as loginwindow:

PID=pid of loginwindow
sudo launchctl bsexec $PID screencapture [options]

“The photograph itself doesn't interest me. I want only to capture a minute part of reality” ~ Henri Cartier-Bresson

Related:

screencapture man page - Apple.com
sips - Scriptable image processing system
OS X Keyboard shortcuts
VLC will also allow screenshots of DVDs


© Copyright SS64.com 1999-2013
Some rights reserved