DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Get A Screenshot
screencapture -S /tmp/screengrab.pdf ; sips -s format png /tmp/screengrab.pdf --out /tmp/screengrab.png; open /tmp/screengrab.png






Comments
Snippets Manager replied on Wed, 2006/08/16 - 11:06am
# Whole screen saved to png screencapture -S -t png /tmp/screenshot.png # Whole screen saved to png and then opened in Preview screencapture -S -t png -P /tmp/screenshot.png # Or if you have something else set to open PNG's by default and want to use that: screencapture -S -t png /tmp/screenshot.png && open /tmp/screenshot.pngCheck out `man screencapture` for other options.Snippets Manager replied on Mon, 2012/05/07 - 2:11pm