TakingScreenshots

TakingScreenshots - Taking Screen Captures

"A picture is worth a thousand words."

Screen captures in software manuals can be an important source of visual verification for readers. Including screen captures in your documents is an effective way to help communicate graphical user interface (GUI) operations.

As useful as images can be, authors need to know when to use them and when not. In general, it is best to use an image in cases where the present state of a screen or dialog needs to be shown to the reader. If a capture is made of a screen or dialog in a normal state, such as when it is first opened, this image conveys very little additional information to the reader than what can already be seen on screen.

However, there are circumstances where a screen capture of the main screen will be provided for aesthetic purposes. An example of this can be seen in the 'Ubuntu Quick Guide,' where a single capture of an applications screen is shown in the begining of each discussion.

In addition to knowing when to use screen captures, authors are also required to know how to take them. This is where the fun begins. In todays world documents are mainly distributed in two formats - electronic and print. Both mediums have their postive and negative points and both have different demands on how much information an image file must contain in order to render clearly in a document. In addition, for electronic formats image size is an issue since a document may need to be retrieved across the Internet before being loaded on screen. In this case, a key consideration when taking screen captures is the file size. Keeping image file sizes small dramatically reduces the download time of documents and makes them easier to load and browse in the readers 'user agent' application.

Screen captures actually only include information about the number of pixels and color. Screen captures do not include resolution information, which is a source of much confusion when it comes to taking screen captures. So in order to achieve a small file size for images one must reduce the number of pixels and colors used not the resolution. Now here is the catch. While small image files with a low amount of information are small and display clearly on screen, they will not necessarily do the same in print format.

For our purposes we wanted to have a single file that could be used for both purposes. To achieve this solution we made some compromises and standardized on an image format and specification that achieved the aims of both mediums. The alternative was to create and maintain two seperate captures, one most suitable for each format. Since we would be printing from PDF we determined that creating captures using an 8-bit (256) color pallet, with dithering taken at a screen dpi of 72 (72 dpi mode), would produce a file that would suffice the needs of both mediums.

NOTE
The method we propose enables you to capture screens using your usual screen resolution and color depth. There is no need to change these settings.

The easiest way to capture images that meet this spec is as follows:

1. Install imagemagick

2. Set your desktop theme to the Standard Ubuntu Theme and the English language, unless you are taking localized screenshots.

3. In a shell session make trunk/images/ the present working directory

4. Issue the command import -frame -depth 8 -dither -quality 9 foo.png

This method of capturing screens and dialogs is convenient as it enables authors to use their usual screen resolution and color depth. There is no need to create a special user and profile just to do screen captures. However, in order to promote consistency in the look and feel across all screenshot images, authors are required to use the standard theme/style of Ubuntu when capturing screenshots.

Tips

If there is some overlapping between the terminal and the windows you want to capture, you can use the sleep command to give you some time to iconize things. This example waits 3 seconds before taking the screenshot:

   sleep 3; import -frame -depth 8 -dither -quality 9 foo.png

Notes and warnings

  • This will create a 72 dpi, 8-bit PNG image in 'trunk/images/' with the window frame, apply Floyd/Steinberg error diffusion to the image and compress it. All screen captures must be saved in the Portable Network Graphic (PNG) file format.
  • The command will overwrite any image with the same file name in this location. If you are making a new screen capture that is not in the repository, take care to supply a unique filename. If you accidently overwrite an existing image do svn revert foo.png to bring back the image from the repository.

Scripting

Below is a script to take screenshots using the above command, but save the the files in a configurable location, and save the files sequentially without overwriting. Save it to a script file, and make sure it's executable. You could probably add this to a launcher on your desktop to make it easy for you to take screenshots.

# Location to save files
WORKINGDIR=$HOME/screenshots
# Default delay before taking screenshots
DELAY=3
#Prefix to use for images captured. 
PREFIX=screenshot

# Check if the dir to store the screenshots exists, else create it: 
if [ ! -d "${WORKINGDIR}" ]; then mkdir "${WORKINGDIR}"; fi 

i=`ls -l $WORKINGDIR/$PREFIX*.png | wc -l` 
((i = i+1))

sleep $DELAY
import -frame -depth 8 -dither -quality 9 $WORKINGDIR/$PREFIX-$i.png


CategoryDocteam

TakingScreenshots (last edited 2008-08-06 16:28:18 by localhost)