Skip to main content
Known Participant
May 23, 2023
Question

detect empty canvas space in fill it with content-aware tool

  • May 23, 2023
  • 2 replies
  • 2291 views

Is there any way in photoshop to automate content-aware fill-in the empty space (caused by canvas resize) of images in batch?

This topic has been closed for replies.

2 replies

Inspiring
May 23, 2023

yes there is.

 

  1. flatten the document before you change the canvas (you now have only the background layer.)
  2. copy the background layer to a new layer
  3. extend the canvas as you want it
  4. select layer contents
  5. inverse the selection
  6. do content-aware fill
  7. deselect
  8. stop recording the action

 

you're done.

 

 

Chuck Uebele
Community Expert
Community Expert
May 23, 2023

You might want to add extending the selection by a couple pixels into the image area just so that there is no change of a line forming between the content aware fill area and the original image. Maybe this isn't an issue.

Stephen Marsh
Community Expert
Community Expert
May 23, 2023

Always useful to have a px or two overlap!

Stephen Marsh
Community Expert
Community Expert
May 23, 2023

I have some ideas, there isn't a default native method that comes to mind as I type.

 

Have all images had their canvas resized? Or is there a mixture of images?

 

Was the canvas extended with transparent pixels, or opaque pixels such as white?

raeenAuthor
Known Participant
May 23, 2023

All images are resized to one size that is 800px*1000px(smart object). When all are resized to this size, some images expose transparent pixels. I want all those transparent pixels to be automatically content aware filled. Is that possible?

Stephen Marsh
Community Expert
Community Expert
May 23, 2023

The reply from @jefbr should get you there, but if you wish to preserve the smart object layer then a slightly different approach may be required.

 

An action or script could do this.