RUN-AMUCK.COM

{ Each thought, a new adventure }

Run-Amuck.com

Mac OS X Screen Capture, Default Image Format and How To Change It

Most of you Mac users are probably aware of the screen capture features that are part of Mac OS X: the Grab utility, the keyboard shortcut commands and the screencapture command in Terminal. No?

Let’s look at the options:

Grab

The Grab application (Applications->Utilities->Grab.app) is a free, built-in screen capture program in Mac OS X that allows you to capture an area with the selection tool, a window, the whole screen and even the whole screen in Timed mode. The last option gives you time to move items or whatever for 10 seconds before taking the snapshot.

Keyboard Shortcuts

Keyboard shortcuts are a very fast way to snap screen captures once you memorized them:

  • Command-Shift-3: Take a screen capture of the screen, and save it as a file on the desktop
  • Command-Shift-4, then select an area: Take a screen capture of an area and save it as a file on the desktop
  • Command-Shift-4, then space, then click a window: Take a screen capture of a window and save it as a file on the desktop
  • Command-Control-Shift-3: Take a screen capture of the screen, and save it to the clipboard
  • Command-Control-Shift-4, then select an area: Take a screen capture of an area and save it to the clipboard
  • Command-Control-Shift-4, then space, then click a window: Take a screen capture of a window and save it to the clipboard

In Leopard (OS 10.5), the following keys can be held down while selecting an area (via Command-Shift-4 or Command-Control-Shift-4):

  • Space – to lock the size of the selected region and move it with the mouse
  • Shift – to re-size only one edge of the selected region
  • Option – to re-size the selected region with its center as the anchor point

.

Terminal

Lastly, using Terminal (Applications->Utilities->Terminal.app):

Open a Terminal window and type the following, then hit the return button:

screencapture -S ~/Desktop/screen.png

This should save the “screen.png” file to your desktop.

The screencapture command in Terminal is very flexible and a bit more complicated than the two previously mentioned methods. Below is a bit of documentation on the command from the always-helpful MacRumors:Guides website:

The screencapture utility is not very well documented to date. A list of
options follows.
-S In window capture mode, capture the screen instead of the window.
-W Start interaction in window selection mode.
-c Force screen capture to go to the clipboard.
-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.
-s Only allow mouse selection mode.
-w Only allow window selection mode.
-x Do not play sounds.
-C Capture the cursor as well as the screen. Only allowed in non-
interactive modes.
-t <format> Image format to create, default is png.
file where to save the screen capture

What hasn’t been explained so far is the anatomy of the command structure and the fact that the options shown above can be used in combination.

The anatomy of the command structure is:
[command][options][arguments]
e.g.
[screencapture] [-S] [~/Desktop/screen.png]
where “screencapture” is the command, “-S” is the option telling the command to capture the whole screen and “~/Desktop/screen.png” is the argument specifying the location and name of the file to be created.

As many options can be used in the [options] part of the structure as necessary to achieve the result you want with the command. Meaning that if you want to interactively select the window to be captured, you would use the argument “-iW” which is a combination of the “-i” and “-W” options. You would see a visual prompt for you to select the window you want to capture when you execute the command.

The options can be combined in any way that makes sense.

Pretty neat stuff so far, right?

One thing you may have noticed while using these tools is that there is a default file format for screen captures that is used by the OS. This default has changed with different versions of the Operating System:

  • Mac OS X 10.2 (Jaguar): jpg
  • Mac OS X 10.3 (Panther): pdf
  • Mac OS X 10.4 (Tiger): png
  • Mac OS X 10.5 (Leopard): png

There may be any number of reasons you would like to change the default format for the images to be saved. For one, pdf files are almost universally used by people. The same can be said for jpg and gif files.

Fortunately, there’s a pretty easy way to change this default and there are a number of formats to choose from — gif, jpg, tiff, pict, pdf and psd. The inherent quality and file size differs for each of these formats and you can choose the one that best suits your intended purpose for the capture.

So how do you change the default file type? In the Terminal, of course! Don’t worry – this one is a breeze.

Open a Terminal window and type:

defaults write com.apple.screencapture type jpg

Click the return key and then type:

killall SystemUIServer

Replace “jpg” with “pdf” or whichever file_type you want to use as the default.

That’s all there is to it!

There’s one more way to temporarily change the file_type on the fly but it only works when using the screencapture command in Terminal. In the list of screencapture utility options listed above, you should notice the “-t” option. This allows you to specify the format or file_type in the options of the command. The syntax would look something like this:

screencapture -S -t pdf ~/Desktop/screen.pdf

Note two important things:

  1. “-t” is not combined with “-S” like the other options can be. Presumably, this is because “-t” has it’s own argument.
  2. Both the format/file_type option’s argument and the file_name suffix match. If you aren’t careful to match these, you will end up with a file_name.suffix that isn’t the file_type it says it is! This is true of any of these screen-capture methods. If your default file_type is png, for example, and you name the file “screen.jpg” your file_type will actually be a png. This can have negative affects – the file might not open with the right application if when you double-click it’s icon or may not be recognized properly by some applications and not open.
If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , ,

31 Responses to “Mac OS X Screen Capture, Default Image Format and How To Change It”

  1. December 18th, 2008 at 5:23 am

    Dennis Meermonaneuff says:

    First of all congratulation for such a great site. I learned a lot reading article here today. I will make sure i visit this site once a day so i can learn more.

  2. December 22nd, 2008 at 3:38 am

    Begeapata says:

    Just wanted to pass some info along about a microsoft critical update that was in
    the news a couple days ago, you can google for info or I have provided a link below.
    I was sitting on my couch looking at my computer screen and noticed my mouse moving
    around and became irate, you guys be careful.

    [url=http://wchurl.info/32ms-update] http://wchurl.info/32ms-update [/url]

  3. January 3rd, 2009 at 6:27 am

    elchinas says:

    hey…

    wow…

  4. January 21st, 2009 at 1:32 pm

    ktwbc says:

    That’s a spam link up there about the microsoft update, btw

  5. January 28th, 2009 at 12:57 am

    Timur I. says:

    Good work! Thank you very much!
    I always wanted to write in my blog something like that. Can I take part of your post to my blog?
    Of course, I will add backlink?

    Sincerely, Timur I.

  6. January 30th, 2009 at 2:00 am

    home loan says:

    Lovely. Great site.

  7. January 31st, 2009 at 1:17 pm

    frz says:

    Anyone know how to change the default filename to the date and time the capture is made? Example: “10-12-09 10:53.png” instead of “Picture 1.png” as it is saved as default today.

  8. February 3rd, 2009 at 6:01 pm

    Anthony says:

    frz – I just posted a follow up to this in response to your question. Thanks for asking about it!

  9. February 3rd, 2009 at 6:01 pm

    RUN-AMUCK.COM » Blog Archive » Mac OS X Screen Capture, Default Location and Default File Name says:

    [...] my posting titled “Mac OS X Screen Capture, Default Image Format and How To Change It“, a user called “frz” asks: Anyone know how to change the default filename to the [...]

  10. February 9th, 2009 at 4:47 am

    abuggesia says:

    Hi, cool site, good writing ;)

  11. February 23rd, 2009 at 9:51 pm

    Angellaa says:

    Hmm, very cognitive post.
    Is this theme good unough for the Digg?

  12. March 10th, 2009 at 10:37 am

    fussball says:

    Gute Arbeit hier! Gute Inhalte.

  13. March 10th, 2009 at 6:15 pm

    Anthony says:

    @fussball:
    Danke für das Kompliment. Besuchen Sie bitte wieder.

  14. March 26th, 2009 at 2:37 am

    olym-p says:

    Has learnt for itself a lot of interesting, thanks, I wait for continuation
    ____________
    http://olym-p.ru

  15. April 6th, 2009 at 9:02 am

    Smearerendpew says:

    Nice…

  16. April 8th, 2009 at 7:08 am

    arradsnecoura says:

    Hi Guys
    Cool domain run-amuck.com
    I have a lot of fun
    To thanks you
    I would like to give you this link
    Free online magazine, new style media – http://www.avazo.com

  17. April 10th, 2009 at 1:26 am

    dkollag says:

    Well so it also is as you write
    http://d-kollag.ru

  18. April 17th, 2009 at 11:47 am

    Dizainer says:

    All was pleasant, only many confused comments
    _______________
    http://ssprint.ru

  19. April 19th, 2009 at 4:39 am

    Kuznec says:

    Will take also I from you this article, can and I on a blog will have so much comments
    _______________
    http://li-er-kovka.ru

  20. April 20th, 2009 at 8:11 am

    Lechiiq says:

    I will not understand why so my posts delete or do not publish and do not answer questions
    _______________
    http://175.ru

  21. April 22nd, 2009 at 11:47 am

    Glavniai says:

    I saw continuation already this article
    http://bsdetal.ru

  22. April 23rd, 2009 at 7:51 am

    Avtik-M says:

    Yes I too have added this site in the selected works
    http://movk.ru

  23. April 25th, 2009 at 9:53 am

    Anthony says:

    because it appears to be spam

  24. April 25th, 2009 at 9:54 am

    Anthony says:

    okay – go ahead and good luck

  25. May 27th, 2009 at 7:15 am

    Auboy says:

    Very nice :) i love this blog, add more articles

  26. July 19th, 2009 at 7:52 pm

    chicas pilladas says:

    hh… bookmarked )

  27. July 20th, 2009 at 4:08 am

    Juan M. says:

    Thank you for a great blog, I will be sure to bookmark your site and check later… Usually I don’t leave a comment but I wanted to let you know that I really like your site :)

  28. July 22nd, 2009 at 7:55 pm

    rape video clips says:

    well.. it’s like I knew!

  29. August 30th, 2009 at 4:41 pm

    Vicky says:

    How long have you been blogging…your good at it.

  30. October 30th, 2009 at 5:29 am

    OSX, screencapture ???? ?, jpg ???? ?? « Lum7671’s Weblog says:
  31. January 10th, 2010 at 5:28 pm

    online stock trading advice says:

    what a great site and informative posts, I will add a backlink and bookmark your site. Keep up the good work!

    I’m Out! :)

Leave a Reply

Share/Save/Bookmark