How Do I Crop an Irregular Shape in Photoshop?

All digital images, without exception, are rectangular. What you can do, however, is use Photoshop to isolate an irregular object in an image, removing everything else. The process relies on creating an accurate selection of your object. This can be done in many different ways, but the most effective methods are the quick mask feature, the Pen tool and an advanced technique involving channels.

...
A complex shape, isolated.
credit: Image courtesy of Adobe.

Quick Mask

Step

Press "F7" to display the Layers pane, if it's not already visible. Double-click the background layer and click "OK" to convert it to a normal layer.

...
Converting the background layer to a normal one.
credit: Image courtesy of Adobe.
...
The image in quick mask mode, with the correct foreground and background colors.
credit: Image courtesy of Adobe.

Step

Press "Q" to enter quick mask mode. You will notice your foreground and background colors change to black and white. If your foreground color is white, press "X" to switch foreground and background colors so you're using black as your foreground color instead.

...
The image in quick mask mode, filled with black.
credit: Image courtesy of Adobe.

Step

Press "G" to select the Paint Bucket tool and click once on your image. Your entire image is now covered with a red overlay. Once you exit quick mask mode, only the parts of your image that are not covered by this overlay will be selected.

...
Selecting a brush preset.
credit: Image courtesy of Adobe.

Step

Press "X" to switch the foreground and background colors and then press "B" to select the Brush tool. Click the "Brush Preset Picker" button in the Options bar and ensure you are using a round brush set to 100 percent hardness. Adjust the size of the brush to one that will allow you to quickly paint over the object you want to isolate -- the exact size depends on both the size of your image and the size of the object within it.

...
The finished mask.
credit: Image courtesy of Adobe.

Step

Carefully paint over the object, removing the red overlay and revealing its natural colors. Press "[" to reduce the size of the brush and "]" to increase it; if you accidentally paint over an area you don't want to include in the selection, press "X" to switch foreground and background colors and paint over the area with black to return the red overlay to it. Press "Ctrl" and "+" to zoom in when you need to work with fine details and "Ctrl" and "-" to zoom out when you want to see the overall result.

...
The finished selection.
credit: Image courtesy of Adobe.

Step

Press "Q" to exit quick mask mode. The object is now selected.

...
Adding the layer mask.
credit: Image courtesy of Adobe.

Step

Click the "Add Layer Mask" button in the Layers pane. This hides any parts of the image that are not selected, isolating the object; the rest of the image appears covered in a gray-and-white checkerboard, Photoshop's way of indicating transparency.

...
Trimming the image.
credit: Image courtesy of Adobe.

Step

Click "Image" and select "Trim." Ensure the "Transparent Pixels" option is selected and click "OK." This trims away excess blank space from the image.

Pen Tool

Step

Press "P" to select the Pen tool and ensure the "Tool Mode" drop-down menu in the Options bar is set to "Path."

...
Setting the correct options for the Pen tool.
credit: Image courtesy of Adobe.
...
The first anchor point placed on the image.
credit: Image courtesy of Adobe.

Step

Click on the image to place your first anchor point. Your goal is to draw a vector path around your object, precisely matching its outline. To draw straight lines, simply click with the tool to set anchor points; to draw curves, click and drag to create handles that affect the slope of the curve. This tool does take some practice, but it's a very quick method to create a precise selection once you get used to it.

...
The completed outline.
credit: Image courtesy of Adobe.

Step

Continue placing points and drawing lines and curves until you have outlined your object. Zoom in and out as necessary to see details better; hold "Ctrl" to temporarily turn the tool into the Direct Selection tool if you need to reposition a point or adjust vector handles.

...
The Selection button in the Options bar.
credit: Image courtesy of Adobe.

Step

Click the "Selection" button in the Options bar.

...
Setting the selection creation options.
credit: Image courtesy of Adobe.

Step

Set the "Feather Radius" to "0," ensure the "Anti-Alias" check box is enabled and click "OK." This turns the path into a selection. If your object is solid and there are no areas you need to add to or remove from the selection, skip the next step.

...
Removing an area from the selection.
credit: Image courtesy of Adobe.

Step

Draw another path around the area you want to add to the selection or remove from it and then click the "Selection" button again. In the Make Selection dialogue box, select "Add to Selection" to add the area you outlined to the selection or "Subtract From Selection" to remove it, and only then click "OK." Repeat this process until your selection is the way you want it.

...
The finished, isolated object.
credit: Image courtesy of Adobe.

Step

Convert the background layer to a normal one, convert the selection to a layer mask and then trim the image.

Channels

Step

Click "Window" and select "Channels" to display the Channels pane, if it's not already visible.

...
The Window menu.
credit: Image courtesy of Adobe.
...
Selecting a channel to use.
credit: Image courtesy of Adobe.

Step

Click through each of the channels and identify the one with the highest contrast between your object and the rest of the image -- it doesn't matter whether the object is darker or lighter than the background.

...
Creating a new image.
credit: Image courtesy of Adobe.

Step

Press "Ctrl-A" to select the entire canvas and "Ctrl-C" to copy it. While you have a single channel selected, doing this copies the channel rather than the entire image. Press "Ctrl-N" to create a new image and simply click "OK" when prompted with the dialogue window -- when you have image data in your clipboard, Photoshop automatically fills in the dialogue window with the relevant information when creating new files.

...
Adjusting the levels for the copied image.
credit: Image courtesy of Adobe.

Step

Press "Ctrl-V" to paste the copied channel into the image and then press "Ctrl-L" to open the Levels adjustment window. Drag the sliders to adjust the colors in the image, increasing the contrast between your object and the rest of the image. It's fine if the object and the background aren't completely solid black and white -- focus on getting the best contrast along the edge of your object without making it turn jagged. Click "OK."

...
The finished black-and-white image.
credit: Image courtesy of Adobe.

Step

If the object is black and the background is white, press "Ctrl-I" to invert the image. Switch to the Brush tool, set it to 100 percent hardness and set your foreground and background colors to black and white. Paint on the image, zooming in and out and adjusting your brush size as necessary. The goal is to have the object you want to isolate be solid white and the rest of the image solid black.

...
Creating a new channel.
credit: Image courtesy of Adobe.

Step

Press "Ctrl-A" to select the entire canvas and then press "Ctrl-C" to copy the altered image. Switch back to your original image and click the "New Channel" button in the Channels pane.

...
Loading the extra channel as a selection.
credit: Image courtesy of Adobe.

Step

Press "Ctrl-V" to paste the contents of your clipboard into the newly created channel and then click the "Load Channel as Selection" button. Press "Ctrl-2" to return the image to the normal display mode.

...
The finished, isolated image.
credit: Image courtesy of Adobe.

Step

Switch to the Layers pane, if it's not already visible. Convert the background layer to a normal one, convert the selection to a layer mask and then trim the image.