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

Automation of resizing without distortion for PNGs

Community Beginner ,
Jun 21, 2022 Jun 21, 2022

Copy link to clipboard

Copied

I am an editor for a local design studio and with all logos (and PNGs otherwise) being different sizes, I wanted to standardize the sizes. I have done batch edits through the 'Automation' Tab with presets on images and graphics but want to know how one would begin to set up an action for the automation tab to make, for example, all Logos/PNGs 3000x3000 at 300 dpi (And they need to be 3000x3000 Px artboard). In trying to figure this out I have made some that 'Fit Image' etc but the artboard would change to the proportions of the PNG/Logo, and when saved, wouldn't be the 1:1 ratio I was looking for. If anybody could help, this would save me a ton of time as I would be manually doing this for 500+ assets.

TOPICS
Actions and scripting , macOS , Windows

Views

221

Translate

Translate

Report

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
Community Expert ,
Jun 21, 2022 Jun 21, 2022

Copy link to clipboard

Copied

Is this Photoshop or Photoshop Elements?

 

Edit: Here is a screenshot of an example action, it uses a conditional action to process flattened with a white background vs. transparent background differently:

 

1000px-square.png

Votes

Translate

Translate

Report

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 ,
Jun 23, 2022 Jun 23, 2022

Copy link to clipboard

Copied

It's in Photoshop

 

Votes

Translate

Translate

Report

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 ,
Jun 23, 2022 Jun 23, 2022

Copy link to clipboard

Copied


@haskellw35332402 wrote:

It's in Photoshop


 

Where is the "I have done batch edits through the 'Automation' Tab"...?

Votes

Translate

Translate

Report

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 ,
Jun 24, 2022 Jun 24, 2022

Copy link to clipboard

Copied

LATEST

File>Automate>Batch>[Insert Action to batch]

Votes

Translate

Translate

Report

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 ,
Jun 21, 2022 Jun 21, 2022

Copy link to clipboard

Copied

Are you wanting to alter/standardise the original files or export out a series of standardised files?

Votes

Translate

Translate

Report

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 ,
Jun 23, 2022 Jun 23, 2022

Copy link to clipboard

Copied

The Client is requesting all PNGs to read out as 3000x3000, Which I can do just by making a PNG fit to a 3000x3000 board but haven't been able to automate the process so I don't have to manually do it for 500 images sadley

 

Votes

Translate

Translate

Report

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 ,
Jun 21, 2022 Jun 21, 2022

Copy link to clipboard

Copied

Do you have square files to start with? In Fit Image it says: Constrain Within and won't make rectangular file > square.

Votes

Translate

Translate

Report

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 ,
Jun 23, 2022 Jun 23, 2022

Copy link to clipboard

Copied

Sadly the photographer shot this in 4:3, which means I cant just resize the original artboard etc to auto-enlarge

 

Votes

Translate

Translate

Report

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 ,
Jun 23, 2022 Jun 23, 2022

Copy link to clipboard

Copied


@haskellw35332402 wrote:

Sadly the photographer shot this in 4:3, which means I cant just resize the original artboard etc to auto-enlarge


 

So you have three choices:

 

1) Crop, deleting content

2) Enlarge canvas to square, content aware fill

3) Content aware scale, protecting a key subject element

 

For 500 images, you are going to need to decide which quantity will require different methods. You can pre-sort in Bridge and then process accordingly.

 

There are no magic answers.

Votes

Translate

Translate

Report

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 ,
Jun 23, 2022 Jun 23, 2022

Copy link to clipboard

Copied

You can record the Automate > Fit Image command into an action and use the Batch command or run the action in Image Processor or other batch processing scripts. Changing the canvas size in the action would then use the constant targeted Fit Image size.

 

If cropping before Fit Image, changing the canvas size width or height will record an absolute value in an action. A script would be required to crop the canvas to either the variable width or height value, removing content. Here is an example:

 

// Crop canvas to square, removing content - based on the image orientation

#target photoshop

/*
AnchorPosition.BOTTOMCENTER
AnchorPosition.BOTTOMLEFT
AnchorPosition.BOTTOMRIGHT
AnchorPosition.MIDDLECENTER
AnchorPosition.MIDDLELEFT
AnchorPosition.MIDDLERIGHT
AnchorPosition.TOPCENTER
AnchorPosition.TOPLEFT
AnchorPosition.TOPRIGHT
*/

var doc = activeDocument;
var savedRuler = app.preferences.rulerUnits;
app.preferences.rulerUnits = Units.PIXELS;
if (doc.height.value > doc.width.value) {
// Crop to square based on variable portrait width short edge value
    doc.resizeCanvas(doc.width.value, doc.width.value, AnchorPosition.MIDDLECENTER);
// Crop to square based on variable landscape height short edge value
} else {
    doc.resizeCanvas(doc.height.value, doc.height.value, AnchorPosition.MIDDLECENTER);
}
app.preferences.rulerUnits = savedRuler;

 

You would obviously use a crop tool 1:1 preset for critical manual crops that require a human evaluation.

Votes

Translate

Translate

Report

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 ,
Jun 21, 2022 Jun 21, 2022

Copy link to clipboard

Copied

Fit Image to standardize to 3000 pixels long side, then Canvas Size to expand short side to 3000 pixels.

Votes

Translate

Translate

Report

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