If you have enough reputation, you can embed images into questions and answers. This covers how to create a screenshot suitable for uploading.
For how to upload a screenshot, see How to upload an image to a post?
Use a plain background
Ideally, you want a plain white background so your screenshot is as simple as possible. To do this, open a new browser window/tab, and drag the desired window in front of it.
Show the cursor
If your screenshot is of a GUI, it's often beneficial to be able to see the appearance and position of the cursor. Not all screenshot tools can capture the cursor; if yours doesn't, you may want to switch to a different method.
Whenever possible, save your image as PNG. PNG is good for images with sharp lines and offers reasonably good compression.
When visitors load the page in a browser, they don't want to wait while a massive image downloads. RSS feed readers also load images, which can cause a significant pause while trying to scroll through a list of unread posts. The size of PNGs can be reduced by increasing the compression ratio, which can be done in some image editors or with specialized compression tools.
Try to make the image as small as possible while still showing the problem. Don't create a 1200x800 image if 400x300 is sufficient. Images that are too large will be scaled down by the SE software, with less than optimal results.
When to not post screenshots
- Do not post images of your code.
- Do not post images of your IDE showing compilation errors.
In these cases, the important part of the problem is the text, so that's what should be included. Simply copy the relevant text and paste it into the post.
How to: Windows
To capture your screen, either:
Paste the result into an image editor and save.
Alternatively, for Windows Vista onwards and Experience Pack for Windows XP Tablet PC Edition 2005, you can use the Snipping Tool application which allows a user to make various forms of screenshots; this often makes your job a lot easier.
How to: Unix-based
Press Print Screen, which launches ksnapshot.
When run, ksnapshot will open with a new screenshot. If necessary (for instance, if you only want a portion of the screen), repeat using other options.
- Use Save As to save the image. If it needs further editing, use Copy to Clipboard and paste it into an image editor.
- Press Alt Print Screen to capture the active window, Print Screen to capture the entire screen.
- You hear a camera sound and the capture appears in a dialog box. Use Save to save it to a file. If it needs further editing, use Copy to Clipboard and paste it into an image editor.
gnome-screenshot can alternatively be launched from the command-line.
--help describes options (delayed captures, border shadows, selecting an area with the mouse),
--interactive gives you a dialog box to select the options interactively.
How to: Mac
To save a screenshot to the desktop, do one of the following:
- Press ⇧⌘3 to take a full-screen screenshot.
- Press ⇧⌘4 to take screenshot of a selected part of the screen.
To save a screenshot to the clipboard, do one of the following:
- Press ⌃⇧⌘3 to take a full-screen screenshot.
Press ⌃⇧⌘4 to take screenshot of a selected part of the screen.
Open Preview and choose File > New from Clipboard. Edit the image and save. After any key combination, press space to limit the screenshot to the frontmost window.
How to: iOS devices
Simultaneously press (and quickly release) the On/Off Sleep/Wake and Home buttons. The screenshot will be added to the Camera Roll album.
How to: Android
- There are a number of screenshot applications available for rooted Android phones, including ShootMe, Screenshot, and drocap2.
- Some Android phones, like the Galaxy S, come with a built-in screenshot app.
- ShootMe (linked above) works on some non-rooted phones.
- If the other options don't work for you:
- Install the Android SDK.
- Connect your phone via USB.
- Run a program called DDMS.
- Select Device > Screen Capture or Ctrl-S to create a screenshot.
Android 4.0+ (Rooted and Unrooted)
Hold down the Volume Down and Power key to capture a screenshot.
More details can be found here
How to: The GIMP
The GIMP is a free multi-platform image manipulation program which does also support capturing screenshots.
- Launch GIMP
- Select File > Create > Screenshot
- Select either the option for taking a screenshot of the whole screen, single window or a certain area
- Press Snap
You now have a screenshot directly in GIMP which you can crop, annotate and enhance with freehand circles.
Community-recommended utilities, plugins, and extensions
- Works with: Firefox
- Can output to either a file or the clipboard
- Capture visible, portion, or whole page
- Awesome Screenshot
- Works with: Safari, Chrome, Firefox
- Capture visible, portion, or whole page
- Text and line annotations
- StackExchange™ SuperCollider Freehand Circle™ Editor
- Works with: Firefox, Chrome
- Works with: Mac (available on the Mac App Store), Android
- Annotations including text, lines, rectangles and freehand circles
- Has a portable version
- Flexible configuration of screenshot destinations (e.g clipboard, file, ...)
- Works with: Windows