Crop and straighten images

Last updated on Oct 6, 2026

Use selections and the Ruler tool to trim edges and align horizons in your photos in Adobe Photoshop on desktop.

Photoshop offers several command-based methods for cropping and straightening images beyond the interactive Crop tool. These approaches work directly with selections, transparent pixels, and reference lines to quickly trim unwanted areas or correct alignment.

You can crop based on a selection, remove unwanted edge colors, separate multiple scanned photos at once, or straighten an image using a reference line. 

Crop to a selection

Use any selection tool to select the area of the image you want to keep.

Select Image > Crop.

Photoshop removes all pixels outside the selection boundary, keeping only the selected area.

Trim transparent or background pixels

Select Image > Trim.

In the Trim dialog, select Transparent pixels to remove transparency at the edges, Top left pixel color to remove areas matching the upper-left pixel, or Bottom right pixel color to remove areas matching the lower-right pixel.

Select one or more areas to trim: Top, Bottom, Left, or Right.

Select OK.

The Trim command analyzes edge pixels and removes uniform areas, keeping only the content you need.

Separate and straighten scanned photos

Open a scanned file containing multiple photos separated by a uniform background color.

Select the layer containing the images.

Select File > Automate > Crop And Straighten Photos.

Each scanned photo opens in its own window, automatically cropped and straightened. For best results, maintain 1/8 inch spacing between photos on the scanner bed.

To process only specific photos, draw a selection around those images. If the command incorrectly splits a single image, draw a selection around that image, including some background. Then hold Alt (Windows) or Option (macOS) while selecting Crop And Straighten Photos.

Straighten with the Ruler tool

Select the Ruler tool from the toolbar.

Drag across a key horizontal or vertical element in your image, such as a horizon line or building edge.

In the options bar, select Straighten.

Photoshop rotates the image to align with your reference line and automatically crops the result. To preserve areas that extend beyond the new boundaries, select Edit > Undo immediately after straightening.

Note

To straighten without automatic cropping, hold Alt (Windows) or Option (macOS) when you select Straighten.