|
|
||||||||||||||
|
|
HTML | Screen Captures |
|
|
|
||||||||||
Screen Captures
In this exercise we are going to cover several topics: how to capture screen images to a GIF file, how to rescale and crop an image, and how to add a link to the GIF image to your homepage.
The two pieces of software that we shall use are SnagIt, a screen
capture shareware program for Windows, and
Paint Shop Pro, another
Windows shareware program that is a valuable asset in converting and manipulating
images. (In fact, we could also use the latter program to convert images in
formats such as BMP to either the GIF or JPEG format that is needed for inline
browser display, but such conversion won't be necessary in the present example.)
Screen Capture with SnagIt
It is often important to be able to capture all or part of the computer display
screen. For example, many of the illustrations in this tutorial started off as
screen capture images.
The standard Windows operating system incorporates a rudimentary
screen capture via the <Print Screen> key,
but the shareware program SnagIt gives a far
richer set of possibilities.
SnagIt Capture Modes
Open SnagIt by going to the folder that contains the program and double-clicking its icon. The resulting display should look like the figure below. This window is divided into three basic sections.
First, you control the program's method of operation by making selections from the menus shown at the top of the window. Second, the hotkey combination that you press to initiate a capture is shown at the very bottom of the window. In the configuration indicated in the figure, you'd start a capture by pressing the <CTRL><SHIFT><P> keys simultaneously.
Finally, the remainder of the window shows the current selections
for each of the pulldown menu
topics. The three icons at the left of the window show the type of screen capture
that the program can perform:
One of these modes of capture can be chosen either by clicking one of the three icons (causing it to appear "pressed") or by making a selection from the "Tools" menu (again the corresponding icon will become "pressed" to reflect this selection). The information shown to the right of the three icons reflects choices made in the other menus. We'll discuss some of the items in these menus next. (These selections indicated in the lower right of the window must be made with the menus; the fields in this part of the window aren't editable.) SnagIt Input Menu
This menu also provides an option to specify whether or not to include the cursor in the captured image if it happens to be inside the capture area (this works only with "Screen" and "Active Window" as input). There is also the "Auto Scroll" option which allows you to capture an entire window's contents instead of just the portion visible onscreen. This can be useful, for example, in capturing all of a long web page when only a portion of it is visible in a browser window. Each of these last two commands is a toggle; a check mark appears besides it if the option is chosen.
Output Menu
This menu also lets you decide whether or not to see a preview of the captured area before sending it on to the destination selected above.
Format Menu
Options Menu
The "Color Boost" option lets you modify the amount of red, green, or blue components of the colors in your image. (The same adjustment is made to a given RGB component of every color in the image.) The "Color Substitution" option lets you replace any color in your image with any other color. Note that the color substitution only is used for captures made after the substitution is chosen. It does not alter the currently captured image. This menu also allows you to select various "Program Preferences". One of these is the hotkey combination that you use to initiate a screen capture. By default, this combination is <CTRL><SHIFT><P> that we saw at the bottom of the first figure in this section. But this menu item lets you redefine the hotkey if you wish to do so. Whether or not you redefine the the key combination that begins a capture, the bottom of the SnagIt window always shows the current definition.
"Program Preferences" also allows you to change the hot key combination
that is used to repeat the previous capture. By default, this is
<CTRL><SHIFT><R>.
Tools Menu
Review In review, the SnagIt window would look like the first figure of this section if we chose to save an image capture in color of a region of the screen that we'll mark with the mouse. Once we've selected the region, we'll get a preview of what the capture looks like. We can then save to a GIF format file on the Desktop (i.e., in c:\windows\desktop).
More information on any of the topics discussed above
can be obtained from SnagIt's Help menu.
Example: Capturing a Screen Image to a File
We are now going to perform an exercise in which we will add a short tutorial on the ftp client WS_FTP LE, complete with illustrative pictures, to our developing homepage. As a first step, let us capture three images from this program.
To begin, let's capture the contents of an entire window.
Make sure that your copy of SnagIt is configured as shown in the first
figure of this section, except use the "Input" menu to select "Window". Then
If you now double-click on the
wsftp1.gif icon on the Desktop, you should see the figure below.
For a second image to use in our tutorial, let's get a screen shot of the main WS_FTP window. After clicking the "Ok" button in the "Session Profile" window, it should disappear, leaving the main WS_FTP window (that had been in the background). Again use the <CTRL><SHIFTL><P> hotkey to begin a capture. Move the hand cursor until the entire main window is enclosed in the colored rectangle and click the left mouse button. When the preview window shows, click the green triangle to signal that you want to save the file. Save this image as wsftp2.gif on the Desktop. This is quite a large image, so let's also have SnagIt capture a version of it at reduced size. Go to SnagIt's "Options" pulldown menu and select "Scale". In the window that opens enter 0.67 for the value of "Scale Image" and click "OK". Now repeat the screen capture of the main WS_FTP window, this time saving to a file wsftp2-small.gif on the Desktop. (This will save a version of the window whose width and height are each 2/3 of those of the previous full-sized version. We'll later use both size images in our tutorial.) Once you've saved this file, go back to "Options/Scale" and reset the value of "Scale Image" to 1.0 so that subsequent screen shots will not be inadvertantantly reduced in size.)
Finally, for our last image, let's make a shot that concentrates on
the list of files on the remote computer.
In this case, let's suppose we want to include in the image
not only the list of files in the right hand window of the main WS_FTP
display, but also the row of buttons above this list. The "Windows" input
option of Snagit won't let us get both the row of buttons and
the list of files in a single image unless we also include the window that
encloses both of these (in this case the entire main WS_FTP window).
So now let's switch SnagIt's input to "Region" in order to make
this capture like we want.
If you now go to the Desktop and double-click on this image files's icon,
you should see an image like the figure below.
Cropping an Image with Paint Shop Pro
We are now almost ready to create our tutorial and add to it the screen shots that we just took. Since SnagIt allowed us to save the shots as GIF files, we do not need to convert these to another format in order to use the shots as inline images. (SnagIt can also save screen captures in other formats, including JPEG and BMP files. We also could use the former as inline images without conversion, but not the latter.) We do, however, want to make a slight modification to our last image. Recall that we intentionally were a bit sloppy when we made the capture using SnagIt's region method of selection. We could have tried to be more careful, but instead we purposefully saved a larger portion of the screen than we really needed to appear in that image. In fact, the reason for doing this was so that we could now illustrate a way to eliminate such unwanted portions of an image, a process known as "image cropping". SnagIt's region capture obviously allows you to perform image cropping before the fact (i.e., before the capture), since in a region capture you are required to specify the boundaries of the area that you want to save. But SnagIt does not provide a means for cropping an image after it has been captured. Since cropping an existing image is something you may frequently find useful, we will now discuss how it can be done with a popular shareware graphics program called Paint Shop Pro (PSP). PSP is actually a general purpose paint program that allows you to create new graphics from scratch and edit and manipulate existing images in a number of ways. For our present purposes we use it only for cropping this one image, but you might find it a very convenient addition to your software collection if you are going to be doing a lot of work with graphics.
Although we haven't needed to take advantage of the fact in this example,
one of the many features of PSP is its ability to
convert between numerous graphics file formats. Thus, for instance, if
we somehow obtained an image that we wanted to use on a web page
that had been
created by a Windows graphics program and saved in BMP format, or by
some Macintosh program and saved in PICT format,
we could use PSP to convert the image into either a GIF or JPEG file.
(PSP, of course, can't read or write every graphics format, but
it is quite versatile at format conversion.)
A Simple Example: Making a WS_FTP Tutorial
Open your homepage file index.html in your home folder and insert the following HTML code at a convenient place:
Save the file index.html, point the browser at it, and reload. You should then have something like the following on your homepage:
In this HTML example, the code
centers the image wsftp1.gif. If we had instead used an image tag like
(without <center> and </center>) the image wsftp1.gif would have been placed inline, aligned left (with text wrapping around it on the right), allowing 15 points of extra horizontal space and 5 points of extra vertical space around the figure (there are 72 points in an inch). While this alignment is one you may often want to use for figures, it would not have been a good choice in this case. Because the text of this tutorial is constrained to fit inside a rather narrow frame, this alignment of the image would have resulted in the figure sittiing on top of, and obscuring, some of the text. The construction <tt> WS_FTP </tt> says to render the word "WS_FTP" in "teletype font" (a fixed-width font often used to signify the name of a computer program). The remaining HTML in this example should be familiar from previous exercises. ASSIGNMENT: Using the preceding as guide, add further explanatory text for the WS_FTP program, using the other two screen shots made in the above discussion. For the second figure in your tutorial, use wsftp2-small.gif as the inline image and link it to the larger wsftp2.gif.
|
||||||||||||||
|
|
||||||||||||||