Up Next
Go up to Part II
Go forward to Cutting and pasting

Manipulating Colors

In the "Lab 2 Images" folder within the CS 105 folder on Cider Press's Courses volume you will find an image named "griffin.jpeg". It is a picture of Griffin Hall. The picture has (at least) two flaws that we would like you to fix: the sky was too gray when it was taken and the camera wasn't quite level. With PhotoShop's help, however, you can turn it into a nice little postcard.

So, copy "griffin.jpeg" to your "graphics" folder. Launch Photoshop and open the image.

Correcting the fact that Griffin is a bit tilted in the original is fairly easy. It can be fixed while cropping the picture. Use the cropping tool to select a rectangular region in the picture as if you were planning to crop right along the foundation of the building. Now, before you do the cropping, position the mouse outside of the cropping marquee, depress the mouse button and drag it around a bit. You will discover you can rotate the cropping marquee. Rotate the marquee so that the edge of the marquee is as close to parallel to the base of the building as you can get it.

Once the edge of the marquee and the edge of the building appear to be parallel, let go of the mouse button. Position the mouse on each of the corners of the cropping marquee and drag these corners as close to the edges of the window as you can. The idea is to crop off as little of the image as possible while keeping the crop rotated enough to straighten out the building. Once the marquee is stretched, press return.

Remember, if you are not happy with the result you can select "Undo" from the "File" menu and try again.

Now, let's make the sky a bit bluer. First, you need to select the pixels that represent the sky. This can be tricky (especially since you want to include the bits of the sky that peek through the trees), but it is good practice using Photoshop's selection tools. There are a number of techniques you may want to try.

Use the magic wand with the shift key depressed to select most of the sky by clicking several times in different regions of the sky. As you do this, you may want to adjust the tolerance that controls how similar a color needs to be to the one you clicked on before the wand will select it. To do this, recall that PhotoShop will display the Magic Wand options pallette if you double-click on the wand tool icon. There is a box in this options palette where you can type a tolerance value. Large numbers make the wand more tolerant when deciding if colors are similar. You can experiment by setting a tolerance value, clicking a portion of the image with the magic wand and then choosing "Undo" from the "Edit" menu if too much gets selected.

Try using the "Grow" item in the "Select" menu to extend the selection. This adds pixels that are adjacent and similar in color to the current selection to the selection. Its notion of "similar in color" can also be adjusted by changing the "tolerance" in the "Magic Wand Options".

Selecting "Similar" from the "Select" menu adds pixels that are similar in color to the current selection whether or not they are adjacent to the current selection. With the tolerance set correctly this can be a good way to get the bits of sky peeking through the trees. Don't forget that you can use the "Undo" button to let you experiment with tolerance values.

You can use the lasso or rectangular selection tool with the shift key depressed to add stubborn pixels. In addition you can use them with the "Option"' key to remove regions that are selected but should not be. For example, suppose you choose "Similar" from the "Select" menu and almost get what you wanted but discover a few pixels from the building are selected. You can hold down the option key and draw a circle around the region that should not have been selected with the lasso to unselect them.

Keep trying until you are happy with the selection. Don't worry if it takes a while. Becoming skillful with the selection tools in Photoshop is one of the keys to using the program effectively.

Once you are happy with the selection, go to the "Image" menu and select "Color balance" from the "Adjust" sub-menu. Use the sliders to increase the "blueness" of the selected region and/or decrease the redness. Try various combinations until the sky looks a bit more like a sunny day. Click "OK", but don't undo the selection yet. First, use the "Hide Edges" item in the "View" menu to get rid of the selection marquee so that you can get a good look at what you have done. If the "horizon" where the new sky meets the tree, ground or building looks a bit too harsh, undo the "Color balance". Then, choose the "Feather" item from the "Select" menu. Roughly, feathering a selection tells the program to smooth out the transition along the edges when you apply an effect to a selection. Enter 3 or 4 for the radius, click "OK" and try adjusting the color again. Remember, you can always undo this adjustment and try another approach if you don't like the results.

Even after you are happy with the sky, don't undo the selection. Instead, choose "Inverse" from the "Select" menu. Now, everything but the sky is selected. We will use this selection to make the brightness of the building more appropriate for the suddenly sunny day.

From the "Image" menu select "Brightness/Contrast" from the "Adjust" sub-menu. Use the sliders to slightly raise both the brightness and the contrast. Play around with these controls until you like the results. If the flashing marquee gets in your way you can hide by holding down the "Apple" key and typing an "h" (this is a shortcut for choosing "Hide Edges" from the "View" menu).

If you want to complete the "Postcard" effect, use the text tool to add something like "Greetings from Williamstown" in the sky above the building.

When all this is done, save the result in your "graphics" folder and add the final image to your gallery page.


Up Next