Content-Aware Fill in Photoshop

Daniel Scott

@dan

Hi, everyone!

In this post we will see Photoshop’s Content-Aware Fill in action and understand why it has been a true image editing game changer over the last few years. Given Photoshop’s present features, I’m sure some of you may be thinking: “but, Dan, with Photoshop’s AI Generative technology already in motion, does it make sense to consider Content-Aware Fill a strong productivity resource?” I’ll be approaching this issue after the step-by-step guides, but I can tease you with a little question of mine: “one day, when cars drive themselves, will it still make sense to learn how to drive?”

The lessons in this post are based on my Advanced Photoshop Class. When you become a BYOL member, you gain access to this course as well as my 30+ additional courses on Figma, Illustrator, Lightroom, Premiere Pro, Webflow, and more. As a BYOL member you will also enjoy personalized support, earn certificates, and tackle exciting community challenges. Get started here.

Are you ready to be amazed? Let’s do it!

Before anything else, it’s not about you!

It’s not really magic, of course, even though it feels like it. I guess it all began with early retouching tools like Clone Stamp, Healing Brush, or the Patch tool. If you’re just starting with Photoshop and still haven't tried these out, I can make it simple by saying that these help in removing distracting or undesired details from an image, fixing blemishes on a model’s face, or restoring old and damaged photographs. Check out my Photoshop Essentials Course to fully understand and master them!

While using these retouching tools, you were manually pointing out to Photoshop some pixels from a specific part of your image, so it could sample and use them to replace those other pixels that had to go away.

Content-aware Fill does exactly that, but Photoshop now automatically scans your image for you, looks for the best fitting pixels for sampling and replacing, and delivers the transformation from a quick and easy selection.

There’s a quick way and an advanced way to work with Content-Aware Fill and you can always adjust and direct Photoshop’s choice of sampling areas to fine tune your retouching and guide it to more seamless results. Let’s see how it all happens.

It all starts with a selection...

1. Remove an object from the background.

Let’s begin with a basic and fast example. We need a clean background to build a project from but there is an “intruder” in the way. We need to make it go away without losing our cool background textures.

To remove that piece of rubbish from the image, we pick a basic selection tool, like the Lasso tool, and we draw a rough shape around it.

The Lasso Tool is perfect for quick and easy selection around the object we want to remove.

The Lasso Tool is perfect for quick and easy selection around the object we want to remove.

We now have a selection area (you can see those “marching ants” moving around it) and we pick options Edit and Fill... from the top menu bar.

Select Fill… from the Edit menu to access the Content-Aware Fill settings.

Select Fill… from the Edit menu to access the Content-Aware Fill settings.

An options box will open and, for this example, we’ll just make sure that the “Content-Aware” setting is active and hit that OK button.

Make sure that Content-Aware is selected under the Contents setting.

Make sure that Content-Aware is selected under the Contents setting.

We then wait a couple of seconds and...

The object’s pixels were replaced by pixels sampled from the image’s background.

The object’s pixels were replaced by pixels sampled from the image’s background.

Look at that! The rubbish is all gone and we have a clean background to work with!

A different way to set up our selection area: we can pick the Spot Healing Brush from the left toolbar and, making sure the Content-Aware setting is active, paint over the unwanted subject and wait for the magic. The Lasso tool gets the job done quicker, this one is best for more accurate selections, like face retouching.

We can use the Spot Healing Brush to paint over the object we need to remove.

We can use the Spot Healing Brush to paint over the object we need to remove.

Content-Aware Fill is very efficient with both smooth and textured or patterned images - textures and patterns can be repeated and keep the finished results as real as possible. Using this tool with complex images with lots of different elements, like a photograph of a busy street or a group portrait, may lead to some “messy” outcomes and ask for more advanced settings.

2. Expand your horizons.

Another cool thing you can do with the Content-Aware Fill tool: expand your image beyond its original limits and get extra room for your projects.

This is also very simple. We’ll start with this landscape and, let’s say, we want to add a message in the sky but there’s not enough space to do it. If only we could go back there and take a new photo… or if only we could add some more sky to it! And we can!

It is possible to expand an image beyond its original dimensions with the Content-Aware Fill tool.

It is possible to expand an image beyond its original dimensions with the Content-Aware Fill tool.

First, we must make room for all that extra sky we want to bring. So, with the Crop tool selected, we change our images dimensions so it has a more vertical direction.

Highlighted crop tool in toolbar and cropping area grid over countryside image in adobe photoshop

Highlighted crop tool in toolbar and cropping area grid over countryside image in adobe photoshop

Next, we use the marque tool to draw a selection, showing Photoshop where we want our sky to grow into and where it will sample those light and color pixels!

Make sure your selection includes a section of the original image so Photoshop can create a seamless expansion.

Make sure your selection includes a section of the original image so Photoshop can create a seamless expansion.

With our selection area defined, and as before, we pick from the top menu bar the options Edit and Fill and we wait for Photoshop to work its magic.

The Content-Aware tool sampled the original image and added more sky to our landscape.

The Content-Aware tool sampled the original image and added more sky to our landscape.

Wow, can we say the sky's not the limit, now? Content-Aware can truly upgrade our Photoshop skills and projects to a whole new level of awesomeness!

3. Limit the sampling area (new to Photoshop 2024)

Content-Aware Fill doesn’t always make the best matches to retouch your photos with that natural look. When this happens, you can show Photoshop the right places to sample from.

Let’s turn the difficulty up a notch. We’ll practice on this black and white photo how we can ask Photoshop to limit or adjust its sampling area so it can deliver the best possible transformation.

To remove the wire from the center of our image, we may need to guide Content-Aware Fill through a few steps.

To remove the wire from the center of our image, we may need to guide Content-Aware Fill through a few steps.

Let’s say we want to remove that wire and leave only the wood textures visible. Let’s begin by selecting the middle section and set it up for removal. We can use the Polygonal Lasso tool for that.

We can make a first selection with the Polygonal Lasso tool.

We can make a first selection with the Polygonal Lasso tool.

With our selection ready, we can select from the top menu bar the options Edit and Content-Aware Fill... Photoshop opens a new window with more settings and preview mode.

The first preview is not a perfect one, we need to adjust some of the sampling area.

The first preview is not a perfect one, we need to adjust some of the sampling area.

The green area on the original image shows the sampling area that Photoshop is reading to replace that wire piece we’ve selected. The preview on the right lets us know that it is having trouble with fixing the image as we expect it to. How do we give Photoshop a hand? We can use the Sampling Brush Tool, set it to “Subtract”, and paint off the green parts we don’t want it to sample from.

By properly defining the sampling area, Photoshop’s Content Aware-Fill can now deliver an improved result.

By properly defining the sampling area, Photoshop’s Content Aware-Fill can now deliver an improved result.

Can you see how the preview has changed? The weird floating wood texture is gone and we can finish it up in no time.

Is there another way to do this, when we have a very limited space to sample from? Yes, there is! Check this out! Let’s look at these books and let’s say we need to change only one of the spines, so we can add a title of our own.

Timeout #1

I know this post is not about AI technology but it’s almost impossible to talk about Content-Aware tools leaving out their current evolution. We know the impact AI will have in our future’s societies, but do we really understand the ethics that have been directing this expansion? Will they ensure AI’s inclusive, safe, and fair application in the future ? We should discuss and think very seriously about this theme.

Let’s change one of the spines from the books on our shelf.

Let’s change one of the spines from the books on our shelf.

First, we duplicate our layer, so we don’t go destructive on our image editing.

Always choose non-destructive editing work methods. Keep your initial image untouched.

Always choose non-destructive editing work methods. Keep your initial image untouched.

Working on our new layer, we select the spine we need to change and we add a Layer Mask - you can click on the Add Layer Mask on the Layers Panel.

Masking our selection will limit the area that Content-Aware Fill will scan for sampling.

Masking our selection will limit the area that Content-Aware Fill will scan for sampling.

Now we are working with the masked layer, we can select the parts we don’t need and Photoshop will limit its sampling to this spine.

Select the elements we need to remove with a quick selection tool, like the Lasso or Marquee Tools.

Select the elements we need to remove with a quick selection tool, like the Lasso or Marquee Tools.

All we need to do is choose Edit and Content-Aware Fill... from the top menu bar and check out the settings and preview.

Content-Aware Fill, with this limited sampling area, immediately delivers a seamlessly clean spine.

Content-Aware Fill, with this limited sampling area, immediately delivers a seamlessly clean spine.

Amazing! A clean spine, all clean and ready for a new design, without any further selection or adjustments!

Now we have a new book on our shelf. Quick and easy with Content-Aware Fill (and some extra editing skills).

Now we have a new book on our shelf. Quick and easy with Content-Aware Fill (and some extra editing skills).

Content-Aware Fill or AI Generative technology?

As promised, a quick paragraph on the “classic” Content-Aware Fill tool and the brand-new AI Generative tools in Photoshop.

AI Generated tools and contents will rule image editing and may throw features like Content-Aware Fill into the shadows.

From where I’m standing, and on the day this blog post is being written, I find use for both “new” and “old” Photoshop tools. I adapt them to the projects I’m working on, available time and deadlines, and on how fast or how perfect I need for a certain action to be. Right now, I find both quite useful.

If I’m quickly retouching a photograph, removing some distracting details, or expanding an image (without the need to generate new and complex stuff) I reach for Content-Aware Fill because it delivers fast and accurately. I use AI Generative tools when I feel the need to add something fresh and new to a design or really make some deep transformation.

Which path should you follow? I’ve always believed that starting from the basics and climbing up to the super-advanced skills – from Zero to Hero, remember? – is the best way to learn and evolve in a skillset. Even when you reach a level in which a machine can do part of your job, your previous learning and working experiences will allow you to set up the best methods, plan and apply the best strategies, and get the most out of the machine’s own work process

Can you create an AI generated orchestral soundtrack for a movie without any musical knowledge or skills? I guess you can! But would those previous knowledge and skills lead the machine itself to a better outcome? For sure, they would!

Can you create AI generated award-winning photographs without any knowledge of photography? Maybe you can! But what if you had a deep understanding of what’s behind photography? I’m sure you’d reach a whole new dimension of art!

In conclusion, “doing” will never replace or happen without “knowing”. So, bring your own laptop, your books, your creativity, and don’t fear technology. Explore and benefit from what it can do for you!

Timeout #2 (just before the finish line)

The future is already buzzing in our present with the AI revolution! If you want to know more about the foundations, don’t miss this article on the Principles of Generative AI Design. It will blow your mind!

What’s Next?

The lessons in this post are based on my Advanced Photoshop Class. When you become a BYOL member, you gain access to this course as well as my 30+ additional courses on Figma, Illustrator, Lightroom, Premiere Pro, Webflow, and more. As a BYOL member you will also enjoy personalized support, earn certificates, and tackle exciting community challenges. Get started here.

See you in class! - Dan