By now you’ve accumulated plenty of documents—music, movie, image, text, and PDF files—and at this point you may want to do something with those files beyond flinging them into folders. One of the best ways to get any such doing done is to double-click them. Try it and their default application opens. In the case of pictures and PDFs, that default application is Apple’s Preview.
As its name implies, Preview is designed to let you view documents. But it doesn’t have mystical all-seeing powers. Rather, it confines its talents to image and PDF files.
Preview’s ability to open image files is very broad. The application supports the major image formats—including those that bear the bmp, gif, jpeg, pict, png, and tiff extensions—as well as rarer file types. And it can export images to most major file types. In addition, you can use Preview to lightly edit these files. For instance, if you need to cut Cousin Jo-Jo out of a photo, you can use the Crop tool to do just that. You can also rotate images, adjust their color and size, annotate them, and select specific portions of them (everyone but Cousin Jo-Jo, for example).
Similarly, you’re not limited to viewing PDF files. You can combine multiple unprotected (meaning not locked by the document’s creator) PDF files into a single document; rearrange their page order; and annotate, crop, and sign PDFs.
Because Preview’s abilities go beyond the obvious ones, we have a fair bit of ground to cover. Consequently, we’ll concentrate on images this week, and In the next lesson we’ll turn our attention to Preview and PDFs.
Images go in and out
You have various ways to open images in Preview. The easiest is to double-click a compatible image file (or group of selected files). By default, it (they) will open in Preview. Alternatively, you can drag images to the Preview icon in the dock. Or within the Preview application, you can choose File > Open and navigate to the image you want to open.
Once an image is open, you can convert it. One avenue for doing so is to hold down the Option key and choose File > Save As. (The Save As command won’t appear if you don’t hold down Option.) In the sheet that appears, click the Format menu and choose a different format; your choices are JPEG, JPEG 2000 (a more recent JPEG standard that provides better compression than the original JPEG format did), OpenEXR (a high-dynamic-range image format), PDF, PNG, and TIFF. Unless you have a very good reason for using JPEG 2000 or OpenEXR, stick with JPEG or PNG. (If you’re unfamiliar with these image types and wonder why you might choose one or another, see my “
20 more technical terms every Mac user should know.”)
If you have some objection to touching the Option key (and really, isn’t it time you got over that?), choose File > Export. You’ll see the exact same sheet with the same options in the Format pop-up menu.
Altering your images
Before converting your images, you may wish to muck with them. For instance, you may find that an image you’ve opened is rotated 90 degrees the wrong way. Or that darned Cousin Jo-Jo may have crept into the outer edge of an otherwise lovely family photo. Let’s now look at some ways you can use Preview to edit your images. To begin, choose View > Show Toolbar (if the toolbar isn’t already present). In addition, choose View > Show Edit Toolbar.
Rotate and flip: I occasionally prod you to memorize certain keyboard shortcuts. This is one such case. Although you could choose Tools > Rotate Right or Tools > Rotate Left, you’ll find it far easier to rotate images if you imprint the Command-R and Command-L commands, respectively, on your brain. (Regrettably one of these commands is not consistent with iPhoto’s Rotate command. In iPhoto you press Command-R to rotate counterclockwise and Command-Option-R to rotate clockwise.)
You can flip images, too. When you choose Tools > Flip Horizontal, the image flips around so that objects that were on the left are now on the right, and vice versa. If you choose Tools > Flip Vertical, the image appears upside-down and backward.
Crop: If you haven’t learned this trick by now, let me catch you up. You can greatly improve many images by cutting out extraneous or distracting material—the kid who expresses his displeasure at the camera by jamming out his tongue, or an element-choked screenshot that hampers the viewer’s ability to focus on the subject of the image. This is where cropping comes in. When you crop an image, you scissor out material you don’t want to see.
By default, the rectangle selection tool is the active option when you open an image. To crop an image, simply click and drag over the portion of the image that you want to keep. If you don’t capture the selection exactly right, just click and drag one of the eight handles (which appear as dots around the edges of the dotted selection border) to resize the selection. To impose the crop, choose Tools > Crop (or memorize and use the handy Command-K shortcut). Do this and you’ll be left with just the portion of the image that you selected.
About selection tools
You don’t have to use a rectangular selection tool, however. If you’ve exposed the toolbar, you’ll see five selection tools listed along the top-right of the toolbar: Rectangle, Elliptical, Lasso, Smart Lasso, and Instant Alpha. Elliptical is straightforward—you use this to create an oval or circular selection. (If you wish to force a perfect circle, hold down the Shift key while making your selection.) The other three selection tools require a bit more explanation.
A Lasso selection lets you draw a selection that exactly matches the contours of the object that you wish to select, much as you might trace around the edges of a magazine’s picture with a pencil or pen. But a Lasso selection isn’t complete until the two ends meet; you must end your selection where you began it.
Making a selection in this way can be challenging because a mouse or trackpad isn’t exactly a precision device. For this reason, Preview includes the other two selection tools—Smart Lasso and Instant Alpha.
When you choose Smart Lasso Preview presents you with a very broad drawing tool. The idea is to “paint” around the edge of the area that you want to select. Preview will then decide what you’re trying to select based on detectable edges. For instance, if you have an image of a tree against a blue sky and you outline the edges of the tree, there’s a good chance that the selection will include all of the tree but none of the sky. You can then crop or copy the selection.
Instant Alpha is even more clever. Again, Preview tries to guess what you mean to select, but this time it bases its assessment on nearby contiguous colors. For instance, suppose that I have an image of the Apple logo—the gray version—on a red background. If I click the Instant Alpha selection tool, click in the middle of that logo, and drag gradually to the right, increasing amounts of that logo will turn red (based on how close they are to the color I initially clicked) indicating that they’re selected. I can then crop the image so that only the logo shows. Or, I can copy it and choose File > New From Clipboard to place the selection in a new PNG document.
Adjusting exposure, color, and size
Although Preview has nowhere near the editing power of iPhoto, Aperture, or Photoshop, it does let you manipulate your images in important ways. The means for doing so are the Adjust Color and Adjust Size commands found in the Tools menu. (You’ll find shortcuts to these commands in the Edit toolbar.)
When you choose Adjust Color, you’ll see a palette similar to iPhoto’s editing pane, with controls for Exposure, Contrast, Highlights, Shadows, Saturation, Temperature, Tint, Sepia, and Sharpness, as well as Auto Levels and Reset All buttons. Someday we’ll talk in depth about adjusting images with such controls, but today is not that day. Play with the sliders, and you’ll get an idea of what they do.
Although you can reduce a file’s size by cropping it, occasionally you’ll want to keep every bit of the image but make the image smaller. That’s the purpose of the Adjust Size command. When you invoke it, a sheet appears where you can choose a new size for the currently active image. You can do this by entering values in the Width and Height fields measured in pixels, percent, inches, centimeters, millimeters, or points; or you can click the Fit Into pop-up menu and select a preset dimension (1024 by 768, for example). When you click the OK button, the image will be resized.
If you increase the size of your image (especially if you do it by a lot), the image is likely to become jagged. This happens because the image’s elements swell up and become blockier. So, while you can get away with small size increases, beware of taking giant steps.
Finally, you can harken back to your grammar school days by doodling all over someone else’s work through the use of annotations. Preview lets you annotate images in several ways, as evidenced by these tools in the Edit toolbar—Rectangle, Oval, Line, Arrow, Text, Speech Bubble, and Thought Bubble. Just select the tool you want to use and drag it over your image. Once you do, the annotation will be selected and you can drag it to a new position. You can also change its shape by dragging one of its handles.
Tiny tip: The Speech and Thought bubble’s arrow (where the words apply) appears where you first click when you drag to create the bubble. So if you want it to point down and to the left—indicating that these words are coming from Cousin Jo-Jo’s lips rather than from Aunt Miffy’s—click with the cursor on Jo-Jo’s mouth and then drag up and to the right.
From the Colors menu to the right of these tools, you can choose a color for your annotation (and this affects both its outline and any text it may contain). You can increase or decrease its line width from the Line Attributes menu to the right of the Colors menu. And if you’d like to choose a different font or font size for annotations that contain text, click the Show Fonts button in the toolbar or choose Tools > Show Fonts (Command-T).
Before we close our textbooks, I’ll end with this annotations tip. You’ve slathered an image with annotations: Poor Cousin Jo-Jo has purple ovals covering his eyes, an arrow through his head, and a thought bubble that reads “I am STOOPID!!!” But in the tranquility of sober and mature reflection, you now regret these additions and would like to remove them.
To avoid the penance of selecting and deleting each one, choose Tools > Show Inspector (Command-I). A small Inspector window will appear and, with luck, will show you a list of the annotations you’ve added. (Select the Annotations tab in this window if you don’t see them.) To remove all of the annotations, press Command-A and then press the Mac’s Delete button. At once they’ll disappear. Alternatively you can press and hold the Command key and then select just the annotations that you wish to remove. As you select an annotation in the list, its drag handles will appear so you can see which annotation you’re dealing with.