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:
- “-t” is not combined with “-S” like the other options can be. Presumably, this is because “-t” has it’s own argument.
- 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.
Tags: application, applications, change, default, file type, format, free, gif, Grab, Jaguar, jpg, keyboard shortcuts, Leopard, Mac, Mac OS X, options, Panther, parts, pdf, png, psd, screen capture, Terminal, tiff, Tiger, universal, website
This entry was posted on Thursday, December 11th, 2008 at 5:01 pm and is filed under Gizmos, Web Development. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Posts

December 18th, 2008 at 5:23 am
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.
December 22nd, 2008 at 3:38 am
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]
January 3rd, 2009 at 6:27 am
elchinas says:hey…
wow…
January 21st, 2009 at 1:32 pm
That’s a spam link up there about the microsoft update, btw
January 28th, 2009 at 12:57 am
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.
January 30th, 2009 at 2:00 am
Lovely. Great site.
January 31st, 2009 at 1:17 pm
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.
February 3rd, 2009 at 6:01 pm
frz – I just posted a follow up to this in response to your question. Thanks for asking about it!
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 [...]
February 9th, 2009 at 4:47 am
Hi, cool site, good writing
February 23rd, 2009 at 9:51 pm
Hmm, very cognitive post.
Is this theme good unough for the Digg?
March 10th, 2009 at 10:37 am
Gute Arbeit hier! Gute Inhalte.
March 10th, 2009 at 6:15 pm
@fussball:
Danke für das Kompliment. Besuchen Sie bitte wieder.
March 26th, 2009 at 2:37 am
Has learnt for itself a lot of interesting, thanks, I wait for continuation
____________
http://olym-p.ru
April 6th, 2009 at 9:02 am
Nice…
April 8th, 2009 at 7:08 am
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
April 10th, 2009 at 1:26 am
Well so it also is as you write
http://d-kollag.ru
April 17th, 2009 at 11:47 am
All was pleasant, only many confused comments
_______________
http://ssprint.ru
April 19th, 2009 at 4:39 am
Will take also I from you this article, can and I on a blog will have so much comments
_______________
http://li-er-kovka.ru
April 20th, 2009 at 8:11 am
I will not understand why so my posts delete or do not publish and do not answer questions
_______________
http://175.ru
April 22nd, 2009 at 11:47 am
I saw continuation already this article
http://bsdetal.ru
April 23rd, 2009 at 7:51 am
Yes I too have added this site in the selected works
http://movk.ru
April 25th, 2009 at 9:53 am
because it appears to be spam
April 25th, 2009 at 9:54 am
okay – go ahead and good luck
May 27th, 2009 at 7:15 am
Very nice
i love this blog, add more articles
July 19th, 2009 at 7:52 pm
hh… bookmarked )
July 20th, 2009 at 4:08 am
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
July 22nd, 2009 at 7:55 pm
well.. it’s like I knew!
August 30th, 2009 at 4:41 pm
How long have you been blogging…your good at it.
October 30th, 2009 at 5:29 am
OSX, screencapture ???? ?, jpg ???? ?? « Lum7671’s Weblog says:[...] ????? : http://run-amuck.com/blog/2008/12/mac-os-x-screen-capture-default-image-format-and-how-to-change-it/ [...]
January 10th, 2010 at 5:28 pm
what a great site and informative posts, I will add a backlink and bookmark your site. Keep up the good work!
I’m Out!