Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Square images and content aware fill action

Explorer ,
Nov 06, 2023 Nov 06, 2023

I want to downsize all my vertical images which are way bigger than the size I want(1000px by 1000px).

How I can create actions which automate this process to bulk square all these images, content aware fill the right/left bars that creates when images squared.

 

Please suggest actions that retains maximum quality and colors do not get changed.

TOPICS
Actions and scripting
2.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Community Expert , Nov 06, 2023 Nov 06, 2023

One way is similar to the following:

 

resize.png

 

You can download the action here, which presumes a flattened Background:

 

https://www.dropbox.com/scl/fi/wl6dilvmfq6bqks8as2be/Resize-to-Square-with-Content-Aware-FIll.atn?rlkey=j1jjtrf6xcchwsdmah4vfg1aa&dl=0

 

You may wish to add a flatten step at the end.

 

Translate
Community Expert , Nov 06, 2023 Nov 06, 2023

Here is another version which creates much better results, using Generative Fill from Photoshop 2024 (not compatible with earlier versions):

 

https://www.dropbox.com/scl/fi/4xmymx4yjgugo0785zqhh/Resize-to-Square-with-Generative-FIll-Ps-2024.atn?rlkey=62rwsqz9omh0rtggq9lxvuonn&dl=0

 

Translate
Adobe
Community Expert ,
Nov 06, 2023 Nov 06, 2023

One way is similar to the following:

 

resize.png

 

You can download the action here, which presumes a flattened Background:

 

https://www.dropbox.com/scl/fi/wl6dilvmfq6bqks8as2be/Resize-to-Square-with-Content-Aware-FIll.atn?rl...

 

You may wish to add a flatten step at the end.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 06, 2023 Nov 06, 2023

Here is another version which creates much better results, using Generative Fill from Photoshop 2024 (not compatible with earlier versions):

 

https://www.dropbox.com/scl/fi/4xmymx4yjgugo0785zqhh/Resize-to-Square-with-Generative-FIll-Ps-2024.a...

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 07, 2023 Nov 07, 2023

When I run your action first time, it promted me twice to contunue but on the 2nd time it just did what I wanted. Thank you so much for the kind help

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 07, 2023 Nov 07, 2023

Your image is a smart object layer. Why? Flatten the image and try again (working on a duplicate of corse).

 

As previously mentioned, the action expects a flattened image with a background layer.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 07, 2023 Nov 07, 2023

Can you modify it in such a way that there is exactly 15% space/margin from top edge of the subject and 10% margin from bottom edge of the subject and subject is centrally aligned meaning space/margin to the left and right side of the subject is equal?

 

Finally, I want to black/white background to draw maximum attention to subject. I request you to please extend/modify this action to accomodate these changes, it would be great help.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 07, 2023 Nov 07, 2023

You can easily modify the action or create a new one yourself.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 07, 2023 Nov 07, 2023

I already tried to do that but problem is parcentage works differently than px in which go to unit for web images.

I also tried https://youtu.be/NQ8bEISDvJc?si=zaGxpxtTDoQ9XG77 this video but it works but print units inches. Can you help if this works but parcentage

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 07, 2023 Nov 07, 2023

Post an example image of what you wish to achieve after the 1000x1000px squared image has been created from the portrait image to assist any forum member who may be interested in contributing.

 

Isn't 15% 150px and 10% 100px based on a 1000px square source image?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 07, 2023 Nov 07, 2023

This is before image

B-Before.jpg

 

This is after image 

after.jpg

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 07, 2023 Nov 07, 2023

Have you posted in the wrong topic?

 

You have another topic about removing borders/frames.

 

This is the first time that you have indicated that these images may have a border/frame in this topic. The expectation was that the image would have no frames or borders as the starting point.

 

You have not provided a 1000px sample.

 

You have not provided a sample with the black borders.

 

It is very hard to help you when you are not providing good information.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 07, 2023 Nov 07, 2023

Here is complete process—

  1. Check whether there is frame/border in the image or not, if yes remove it.
  2. After removing the frame, all images are tall that needs to be squared. Here centring subject with equal space right and left along with margin top and bottom of the subject. This way all images will be consistent.
  3. Last step is to make background black and white to increase attention on the subject.

 

I asked in steps because it is long process difficult to achieve in one step/action. Hope you don't mind. Thank you for all the replies

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 07, 2023 Nov 07, 2023

@raeen

 


After removing the frame, all images are tall that needs to be squared. Here centring subject with equal space right and left along with margin top and bottom of the subject. This way all images will be consistent.

 

More information is required for your processing steps in point #2...

 

For a relative margin of 15% top and 10% bottom – should this be based off the original model selection?

 

Such as:

 

isthiswatyouwant.png


The left and right margin would be centred and the same as the height of the model and 25% extension.

 

Then after the image is sqare cropped from this position, the content aware or generative fill would be applied to fill in missing content.

 

Then the image would be resized to 1000px square.

 

Is my understanding correct?

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 07, 2023 Nov 07, 2023

Here are the steps again with output image
Step 1- Check whether there is frame/border around the image or not?
Step 2- If there is border remove it.
Step 3- Center the subject(15% margin at top and 10% margin at the bottom of the subject. Equal space/margin to left and right of the subject)
Step 4- Square the image
Step 5- Resize the image so it becomes 1000px by 1000px
Step 6- Desaturate background

You can rearrange the steps to minimize quality loss and to make actions work efficiently.

If whole process can't be achieved in one action, it can be broke down in 2 or more actions so I can run one at a time to get. I have attached final output

 

after-copy.jpg

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 07, 2023 Nov 07, 2023

Great, please compare the results of the action that I made to your sample, they are not the same in size, but they should be similar... (PSD attached).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 07, 2023 Nov 07, 2023

Your result is exactly the same what I want but following 2 steps

1. Black/white background

2. Now margin at bottom needs to be 8% and top 10%(earlier it was 10% bottom and 15% top)

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 07, 2023 Nov 07, 2023
quote

Your result is exactly the same what I want but following 2 steps

1. Black/white background

2. Now margin at bottom needs to be 8% and top 10%(earlier it was 10% bottom and 15% top)

 


By @raeen

 

OK, I have taken the action as far as I can.

 

The action does everything except to select the "bad" areas and perform the content aware or generative fill.

 

The rest is up to you.

 

https://www.dropbox.com/scl/fi/1awiq1lb1kx49jiqqzhef/Centre-Subject-in-Square.atn?rlkey=t58w6akt5loc...

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 07, 2023 Nov 07, 2023

This is giving exactly the output I am aiming for but there only one crucial problem. 

It is adding white space to square and centring the subject.

 

For example, this is image that I want to processsayuri-mashooqa-hd_53313229839_o.jpg

 

This is the output I am getting after running your action(with white space)

output 2.jpg

 

But this is the output that I am looking for (the white space should be filled with content aware tool)

 

output.jpg

 

You can just remove the step that adds 10% top and 8% bottom margin, unnecessary. Keeping the subject in the center(maintaining equal space at right/left would be enough)

 

I am not using Ps 24 hence I do not have access to generative fill. Please make it work on ordinary content aware fill

 

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 08, 2023 Nov 08, 2023

@raeen – You can edit the action yourself, I'm done.

 

There are thousands of forum topics, website guides and videos on the topic.

 

https://helpx.adobe.com/photoshop/using/creating-actions.html

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 08, 2023 Nov 08, 2023
LATEST

okay, thank you so much for the time

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines