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

How to batch equal canvas size increase on non-square images

Community Beginner ,
Feb 26, 2023 Feb 26, 2023

I regularly need to input a 10%-20% increase in canvas width (or height) with images that aren't perfect squares, yet keep a consistent white border. For instance, I want to batch-process 100 images with varied ratios. I need the same pixel dimensions on all sides after specifying a percentage on one dimension. The only way I can do this is by noting down the horizontal dimension in pixels, adding 10% to the canvas size, then subtracting the original horizontal dimensions from the larger new horizontal dimensions. The resulting number I then need to add to the vertical dimensions. Sounds complicated, but actually a simple and necessary action to give an equal white border on many images with different image ratios. Surely there's a way to batch. Any help on this?

TOPICS
Actions and scripting , macOS
2.0K
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
Adobe
Contributor ,
Feb 27, 2023 Feb 27, 2023

It sounds like this can be done using an action.

 

Could you provide a couple of before & after examples? This would make it a lot easier to understand and the answers you get will be a lot better.

 

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 Beginner ,
Feb 27, 2023 Feb 27, 2023

Thanks, I think I've worked it out now 🙂

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 ,
Feb 27, 2023 Feb 27, 2023

Keeping the same horizontal and vertical addition to canvas size might be problematic.  There is no problem doing the one with an action.  Set the rulers to Percentage to record the action.  You can see that using Percent for the other axis will result in a different pixel size with a non square aspect ratio.  So it might be down to using a script.

 

@Stephen Marsh  is one of the forum scripting experts.

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 Beginner ,
Feb 27, 2023 Feb 27, 2023

You're right, I think a script is the way to go! I'll look in to that, thanks 🙂

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 ,
Feb 27, 2023 Feb 27, 2023
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 Beginner ,
Feb 27, 2023 Feb 27, 2023
LATEST

Thanks, I'll check them out! 🙂

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