Introduction to Photoshop


Topics

  1. Overview of Photoshop
  2. Separating an Object from its Background
  3. Creating a New Background
  4. Review of Handy Short-Cut Keys
  5. References
  6. Exercise

Please get the Photoshop examples and images used in this lab, by clicking here


1. Overview of Photoshop

We learned from the Python lab on pictures, that images are arrays of pixels that can be manipulated to change the overall look. Photoshop is a tool that we can use to modify the pixels. I will not lie to you: Photoshop is an extremely large package. We could spend the entire lab covering just Photoshop's features alone. Photographer friends who use Photoshop all the time say that they do not know Photoshop; but they know enough to produce some amazing results. In this lab, we are going to familiarize ourselves with Photoshop. Because this class is about "multimedia", images are only a small part. We do not have time to get into all of the wonderful things that Photoshop can do. If you have time and would like to learn more cool things to do in Photoshop, I recommend the book in the reference section for inspiration and cool little projects that you can follow along with to get some really neat effects.

1.1 The Photoshop Environment

Let's look at some of the key components of Photoshop. If you would like to follow along, you can open the butterfly.jpg file included in this week's sample

Photoshop Parts

Two handy panels are shown below:

1.2 Looking Ahead at What We Will Be Doing

For your lab instructor, one of the most useful feature of Photoshop. is the ability to cut out parts of an image and use them in posters or in conjunction with other images. To give you a preview of what is to come in the lab, we will start with the butterfly.jpg image:

Butterfly Original

We will then manipulate it by "cutting" out the butterfly and creating a new background to get something like the following image (notice how we are using Photoshop to create a mirror image effect):
Butterfly Done

To do this, we will be exploring a small part of Photoshop:


2. Separating an Object from its Background

There are multiple ways of separating an object from its background. Including: Quick Selection Tool, Magic Wand or Lasso Tools. We are going to focus on an approach that does not use these tools. There is no particular reason for this preference besides that it "seems" quicker to separate the object from the scene. In reality, to get all of the edges "cut out" nicely, it takes a bit of time.

2.1 Using Color Ranges

In the picture of the butterfly that we are starting with, the butterfly is the only thing orange. Because it contrasts nicely with the background, we can select it using color ranges and then refine our selection. These two steps are broken down below:

2.1.1 Select Using Color Ranges

This assumes that you have "butterfly.jpg" open. You can use the File > Open... menu and choose "butterfly.jpg" in the Downloads folder (under your username).

  1. First, ensure that you are not modifying the original image. You can do that by duplicating the layer using command-j. Notice that you will get a new layer which is an exact copy of the Background, but called Layer 1:
    Duplicate Layer

  2. From the main menu, choose Select > Color Range...

  3. The following dialog box is displayed:
    Color Range

    1. Click inside the butterfly

    2. Ensure that "Localized Color Clusters" is checked and set the Fuzziness and Range to the values encircled in red: 103 and 37.

    3. Select the eyedropper with a plus sign beside it: Eye Dropper to ensure that each time you click on the butterfly it adds to your selection

    4. Click on two or three more (black colored) places inside the butterfly

  4. Click the "OK" button.

You will see a "marching ants" selection on your image. The selection will be missing parts of the inside of the butterfly. We need the next step to select more of the inside of the butterfly.

2.1.2 Refine Edges

This section will refine the selection a little. The steps are:

  1. From the main menu, choose Select > Refine Edge

  2. The following dialog box is displayed:
    Refine Edge
    You can use the settings shown above or try experimenting to find your own. These settings were chosen because the preview looked pretty good.

  3. Your selection will look something like the image below. Click on the Add a vector mask button, shown encircled in red below.
    Add Mask

Notice that the mask produced is black and white beside Layer 1. You probably are wondering what the heck a mask is! Think about a mask in life. Usually it covers someone's face but the eyes can be seen. In our mask, we are covering the background (using black) and "cutting" the butterfly out (using white) so that it shows through. In the layers panel, If we click on the eye for the "Background" layer, we will see the full effect of the mask. It is not perfect, so we will try and fix the mask by using the paintbrush tool.

2.2 Painting the Mask

To summarize the idea of masks: black hides and white reveals. We are going to use brushes and paint in black and white to fix our mask. The steps are below:

  1. alt-click on the black and white mask in the Layers Panel. This will reveal the mask in grayscale mode. The idea will be that you will paint the parts inside the butterfly white and the parts outside of the butterfly black.
    Show Mask

  2. Now, select the Brush in the Tool Bar:
    Brush in Tool Bar

  3. In the Options Bar, click on the down arrow beside the Brush:
    Brush Options

    A round brush should be selected, but if it isn't then click on any of the circles as shown in the above diagram. Then, adjust the Master Diameter to 83 px and the Hardness to 100%. If you wanted a softer "edge" between the object and its background, then you would make the Hardness less than 100%.

  4. To set the brush color to white, type the letter "d" (think "Default"). Paint (by clicking and dragging over) the black dots along the inside edges of the butterfly wings.

  5. Change the brush color to black, type the letter "x" (think "eXchange"). Paint (by clicking and dragging over) the white spots outside of the butterfly.

    Your results should look something like this:
    Butterfly Mask

    Now, we should refine the edges and get all of the antennae. Depending on how anal you are, this can take quite a bit of time.

    To get the refinement, we will do three things: 1) look at the background underneath the mask, 2) zoom in, and 3) change the size of the brush

  6. To see the background underneath the mask, we can use what is called "rubylith overlay" for the mask (instead of the grayscale used above):

    1. Click on a different layer or on the image thumbnail to stop viewing the grayscale mode (or alt-click on the layer mask)

    2. alt-shift-click on the layer mask thumbnail

    The background and butterfly should look something like this:

    Rubylith Overlay

    As a note, if you find that red does not separate well from your image, then you can choose a different color by double-clicking on the mask thumbnail. The following dialog will appear:
    Change Mask

    Double-click on the red to choose a different color.

  7. To zoom in, we can use the short-cut key: command-plus(+). Zoom in to about 100% (shown in the bottom left-hand corner or in the document tab)

  8. Click on the mask in the Layer Panel. Ensure that the dashed lines are around the thumbnail showing that it is selected.

  9. Adjust the brush size: press the "[" key for a successively smaller brush and the "]" key for a larger brush.

  10. Go around the edges and paint. Remember black should be for the outside of the butterfly and white will be for inside of the butterfly.
    As you might tell, this part can take awhile.

To save time, you can use the butterflyCropped.psd file provided in the sample code for this week that has a mask with refined edges.

2.3 Isolate the Butterfly

Two final steps-applying the mask and cropping the butterfly-will make copying the butterfly into another document easier.

  1. Right click on the thumbnail of the mask and choose Apply Layer Mask as shown in the diagram below:
    Apply Mask

    After this, your layer will change so that the mask no longer exists. You are committing to changing the layer.

  2. Select the Crop tool in the Tool Bar:
    Crop Tool

  3. Click and drag around the butterfly. When you are happy with the selection, click on the check mark icon shown encircled in red below.
    Commit Crop

You might want to save your file as a new psd (Photoshop format) file. Choose File > Save As... from the main menu.


3. Creating a New Background

Now, for the fun part of creating your own background for the butterfly!

First we will create a new document. Choose File > New... from the main menu. The following is the dialog box that appears:

New Document

Using the arrows, encircled in red above, choose U.S. Paper and Letter. As a note, the name of this document has been kept as "Untitled-1", and later saved as something else.

3.1 Create a Gradient Background

Let us create a background that changes from blue to black.

  1. First, we will set the foreground to blue and the background to black. For the black background, type 'd' and then 'x'.
    To get the blue color, double click on the Foreground color sample near the bottom of the Tool Bar:
    Select Foreground


  2. The following "Color Picker" Dialog box will be displayed:
    Color Picker
    To get the exact shade of blue, you can type beside the R, G, and B the values shown encircled in red: 144, 190, and 243

  3. Next, select the Gradient tool from the Tool Bar:
    Gradient Tool

  4. In the Options Bar, click on the down arrow (encircled below) and ensure that the "Foreground to Background" (first option) is selected.
    Linear Gradient

    Also, choose "Linear Gradient" as the gradient type by clicking on the icon (encircled in red above)

  5. You are ready to go! Click and drag (from top to bottom) on your new document. If you want to ensure a straight line, hold down the shift key before clicking and dragging. The following diagram shows where you can click and drag to get similar results:
    Drag Gradient

    You should now have blue on the top and black on the bottom with a transition between.

3.2 Copying in our Image and Mirror Imaging it

In this section, we will copy the butterfly into our new document. There are multiple ways of doing this; we will go through one method.

  1. Go back into the butterfly document (If you have not closed it, you can find it under the Window menu).

  2. In the Layer Panel, click on the isolated butterfly layer to select it.

  3. Under the main menu, choose: Layer > Duplicate Layer.... The following dialog box will be displayed:
    Duplicate Butterfly
    Choose the "Destination" as your new document with the gradient (in this case, called "Untitled-1"). You can find this document by clicking on the arrows shown encircled in red and a list will appear.

  4. Return to your new document with the gradient. Click on the Move tool (shown below) in the Tool Bar to select it:
    Move Tool

  5. From the Options Bar, click on the box to check "Show Transform Controls"
    Show Transform Controls

    The butterfly in the document window should now be shown with "boxes" around the borders.

  6. To make the butterfly bigger or smaller (without squishing it in one direction or the other), hold down the shift key and click and drag on a corner box.

  7. To rotate the butterfly, hover outside of the corner box and notice how the mouse changes to a "rotate cursor":Rotate Cursor.
    Click and drag to rotate the butterfly until it looks something like this:
    Rotate Butterfly


  8. To commit the transformation, press the enter key, or click on the check mark in the Options Bar:
    Commit Transformation


    Now you will be ready to add a mirror image.

  9. First, copy the selected butterfly layer by typing command-j. This will add another layer to the Layer Panel.

  10. Then, from the main menu, choose: Edit > Transform > Flip Vertical

  11. Now, move the flipped butterfly directly below the original using the Move tool. To keep the butterfly directly underneath, hold down the shift key while clicking and dragging.

  12. You can now "skew" the reflection by pressing on the command key and clicking and dragging on a corner point. You might have to "skew" two corner points. The goal is to get both parts of the wing touching like in the picture below:
    Skewed Butterfly

    Remember to commit the transformation by pressing the enter key or clicking on the check mark in the Options Bar.


    Now let us make it look more like a reflection.

  13. First, let's change the Opacity of the copied butterfly to 70%:
    Mask For Reflection

  14. Then, click on the "Add vector mask" button (also shown in the picture above).

    Beside Layer 1 copy, there should now be a white mask. Ensure that the mask is selected (shown with dashed lines around it).


    We will now make a gradient that changes from black to white.

  15. Make sure that your foreground and background colors and white and black respectively. You remember what key to press, right? Remember "Default".

  16. Select the Gradient tool from the Tool Bar. The settings in the Options Bar will be the same as what we previously used for the Gradient tool.

  17. Hold down the shift key and click and drag from the upper edge of the flipped butterfly to midway down. You should now have a "reflection" that looks something like this:
    Butterfly and Reflection

    Nice, we did it! We made a reflection of the butterfly using Photoshop instead of JES. However, the underlying concept of how it the pixels are being modified is still the same.

3.3 Adding Swirls

Just to fancy up our picture, we will add some swirls (and a reflection too).

  1. Under the File menu, choose Open...

  2. In the "Open" dialog box, choose "swirlsMe5f.ai", which was included with this week's sample package

  3. Click the OK button for the "Import PDF" Dialog box

  4. Choose Layer > Duplicate Layer... from the main menu. As a Destination, choose our "Untitled-1" document.

  5. In our "Untitled-1" document, ensure that our new swirl layer is selected.
    Then press command-i to invert the color so that the swirl is white instead of black.

  6. Flip the swirl horizontally, by choosing: Edit > Transform > Flip Horizontal

  7. Use the Move tool to rotate and resize the swirls so that it looks something like this:
    Butterfly And Swirls

    If the swirl is in front of the butterfly, then in the Layer panel, you can drag and drop the swirl layer so that it is under the butterfly layers.

  8. To create a more blended look, change "Normal" to "Screen" using the drop down list. Also, change the opacity to 40% as shown below.
    Screen Blend


    Now, to create the reflection of the swirl.

  9. Copy the swirl layer using command-j.

  10. With the copy of the swirl selected, choose Edit > Transform > Flip Vertical

  11. With the Move tool selected, Shift-drag the copy of the swirl so that it is behind the wings of the upright butterfly.

  12. In the Layer Panel, change the Opacity to: 9%

  13. Now we are going to do something that makes applying a mask to our reflected swirl easy. Hold down the "alt" key and drag the mask from the butterfly reflection to the swirl reflection.

    This should duplicate the mask. And, voila, we are done! Our final picture will look something like this:
    Butterfly Done


5. Review of Handy Short-Cut Keys

Photoshop has short-cut keys that are super handy. As a review, here are the "top twelve" that we used in this lab:

Short Cut Key Description
command-plus(+) Zoom in
command-minus(-) Zoom out
d Set default colors (black foreground and white background)
x Switch foreground and background colors
[ Decrease brush size
] Increase brush size
command-d "Deselect" selection
Short Cut Keys Specific to the Layer Panel:
command-j Duplicate a layer
command-i Invert a Mask
alt-drag mask thumbnail Copies the mask to another layer
alt-click on mask thumbnail View mask in grayscale
alt-shift-click on mask thumbnail View mask in rubylith overlay

Just a note on the Background layer: you typically cannot apply certain changes to this layer. One way of getting around this is to duplicate the background layer and make changes to the duplication. Another way is by double clicking on "Background" and renaming it something else like "Layer 0".


5. References


6. Exercise

We learned a little about Photoshop in this lab. You should know enough to be able to extract a portion (if not all) of you and "put" yourself in a different environment (just like we put the butterfly in a different environment).

More details:

Try it out and have fun being creative!