Sub topic 7
Filling empty corners with Content-Aware
This chapter assumes you can use the Crop tool and its options bar, and you know how the Straighten option and Delete Cropped Pixels work. It also assumes you understand layers at a basic level. You will learn how the Content-Aware option fills the empty areas that appear when you rotate a crop or extend it beyond the image. You will also learn where it fails and what to do then.
The problem Content-Aware solves
When you rotate a crop box, or drag its edges outside the canvas, part of the crop area contains no image data. Without help, Photoshop leaves those areas transparent on a layer, or fills them with the background color on a flattened image.
You have three ways to deal with that:
- Shrink the crop box until it sits entirely inside the rotated image. This loses pixels at the edges but invents nothing.
- Leave the empty areas and fix them later with a manual fill.
- Turn on Content-Aware and let Photoshop synthesize pixels to fill the empty areas when you commit the crop.
Content-Aware is option 3. It samples texture and color from the existing image and generates new pixels to match. It is a good fit for skies, grass, water, walls and other textures with no clear structure. It is a poor fit for faces, text, and straight architectural lines.
Turning the option on
Select the Crop tool (C). In the options bar, find the Content-Aware checkbox. It appears when the tool is active and a crop box is on the canvas. Check it before you commit the crop.
Two other settings interact with it:
- Delete Cropped Pixels should usually be off when you use Content-Aware. Photoshop then keeps the original pixels and the generated fill stays editable on a layer, as described below.
- Straighten and manual rotation are the usual reasons for empty corners, so you will often combine them with this option.
The fill is generated when you commit the crop, by pressing Enter or Return or clicking the checkmark in the options bar. The checkbox alone changes nothing until then.
Worked example: straighten and fill
This workflow tilts a horizon and fills the corners instead of cropping them away.
- Open a photo with a slightly tilted horizon. Duplicate the layer if you want a safety copy.
- Select the Crop tool. Turn off Delete Cropped Pixels.
- Click Straighten in the options bar, then drag a line along the horizon. Photoshop rotates the crop box to match.
- Drag the crop handles outward until the box covers the whole original canvas, including the empty triangles at the corners. The box now extends past the rotated image.
- Check Content-Aware.
- Press Enter or Return to commit.
Photoshop crops the image and fills the empty corners with generated content. The result keeps the full canvas size instead of the smaller interior rectangle you would otherwise get.
Where the fill goes
What happens to the generated pixels depends on the layer structure and on Delete Cropped Pixels.
| Situation | Where the fill appears |
|---|---|
| Single unlocked layer, Delete Cropped Pixels off | On the layer itself. The original pixels outside the crop are hidden, not deleted. |
| Background layer | Photoshop converts the cropping so the fill is applied to the image. The Background layer is locked, so keep a duplicate. |
| Several layers | The fill is generated from the visible, composited image and is applied to the layer that is selected. Results vary by version, so check the Layers panel after committing. |
Because layer behavior can differ between versions, make a habit of looking at the Layers panel after every Content-Aware crop. If the fill ended up where you did not want it, undo with Ctrl+Z (Windows) or Cmd+Z (Mac) and adjust the layer setup first.
Why it sometimes looks wrong
Content-Aware synthesizes pixels from nearby image content. That means its quality depends on what is near the empty area. These are the common failures:
- Repeating patterns. The fill copies texture from the neighborhood, so you may see tiled or smeared patches in clouds, foliage or gravel.
- Hard edges at the border. A strong line that meets the empty corner, such as a building edge, a fence or a shoreline, is often continued badly or bent.
- Large gaps. The bigger the empty area compared with the usable surrounding image, the less convincing the result. A few degrees of rotation fills well. A 20-degree rotation with a tight crop often does not.
- Subjects near the corner. If a person, animal or sign sits close to the empty area, the fill may borrow parts of it and produce odd duplicates.
- Mixed content. A corner that spans sky and a tree line gives the algorithm two competing sources, and the join can look blurred.
Checking and repairing the result
After you commit, zoom to 100 percent and inspect each filled corner. Compare it against the surrounding area. Look for repeated shapes and soft or smeared patches.
If the fill is close but not perfect, you have several options:
- Clone Stamp or Healing Brush. Retouch the problem spots by hand on a new empty layer, with the sampling set to sample from the layer below or from all layers.
- Edit > Fill with Content-Aware. Make a selection of the bad area and use the dedicated Content-Aware Fill workspace, which lets you choose which areas to sample from. This gives you far more control than the checkbox.
- Undo and crop tighter. If a corner cannot be fixed, accept a smaller crop. A slightly tighter crop that contains only real pixels is often better than a perfect-looking fake.
A common production pattern is to commit the Content-Aware crop, then fix only the corners that failed, instead of retouching everything.
Comparing the three approaches
| Approach | Keeps full canvas | Invents pixels | Reversible | Best for |
|---|---|---|---|---|
| Crop inside the rotated image | No | No | Yes, if Delete Cropped Pixels is off | Anything where accuracy matters |
| Content-Aware checkbox | Yes | Yes | Undo, or keep a duplicate layer | Small rotations, textured scenes |
| Content-Aware Fill workspace on a selection | Yes | Yes | Yes, if output goes to a new layer | Difficult corners that need control |
The workspace option can output to a new layer, which is the most reversible way to use generated content.
Practical guidelines
- Straighten first, then judge how much empty area appears. Small angles make the best candidates for Content-Aware.
- Keep Delete Cropped Pixels off so you can change the crop later.
- Work on a duplicate layer or a copy of the file when the original matters.
- Inspect at 100 percent. Corner defects are easy to miss when the whole image is fitted to the screen.
- Do not try to expand a crop far beyond the canvas to add a large new area. Use a different tool for big extensions, and accept that quality drops with distance.
- If the same repeating-texture artifact shows up after two attempts, stop and use a tighter crop or a manual repair.
Common errors
- Checkbox is missing or grayed out. Make sure the Crop tool is active and a crop box is on the canvas. The option can also be unavailable in some contexts, such as when the crop does not extend beyond the image.
- Nothing was filled. The crop box stayed inside the image, so no empty area existed. Drag the handles outward over the empty corners.
- Corners are still transparent. You may have committed without the box covering the empty areas, or the checkbox was off at the moment you committed. Undo, check the box and recommit.
- The fill looks like a copy of the subject. The subject is too close to the empty area. Undo and retouch with the Content-Aware Fill workspace, sampling only from a clean region.
- You cannot recover the original corners. Delete Cropped Pixels was on. Reopen the file, or undo while you still can.
Exercise
You rotated a landscape photo by 3 degrees with the Straighten option and expanded the crop box to cover the whole canvas. After you commit with Content-Aware on, one corner shows a repeated cloud pattern. List two ways to fix it without starting over, and name one setting you should have kept off to keep the original pixels available.
Show answer
Two options: retouch the corner with the Clone Stamp or Healing Brush on a new layer, or select the corner and use the Content-Aware Fill workspace, choosing a clean sampling area and outputting to a new layer. You could also undo and crop slightly tighter. The setting to keep off is Delete Cropped Pixels.
Exercise
A photo contains a straight building edge that runs into an empty corner after rotation. Explain why Content-Aware often fails here and what you would choose instead.
Show answer
The fill synthesizes texture from nearby pixels and does not understand structure, so it tends to bend, blur or break a hard straight line. Crop inside the rotated image so no corner is empty, or repair the edge manually with a selection and the Content-Aware Fill workspace or a drawn path.