Skip to main content
Known Participant
June 27, 2022
Question

Resizing layers with different aspect ratios

  • June 27, 2022
  • 2 replies
  • 425 views

Hi everyone!

 

I currently have an action that takes layers from other pictures and gathers them into a new one. The problem is that they are different sizes and have different aspect ratios. Is there a script that would make them relatively same sized and keep their aspect ratios. The new file that i gather the layers in, is a 30cmx30cm 300px/square inch.

 

Thank you in advance!

This topic has been closed for replies.

2 replies

Stephen Marsh
Community Expert
Community Expert
June 27, 2022

Perhaps a screenshot of the layers panel would help...

 

Are the layers larger than the canvas?

Known Participant
June 28, 2022

Hi,

 

Here are 2 examples of the problem without the script to make them relatively same sized on the new backround. Im not sure if this helps. If it matters, i use premade paths to cut out the products of the white backround.

 

 

Known Participant
June 27, 2022

The files attached are examples of different products. Now i am doing them manually but it would make it 1000x faster if i could make them with a batch action and for that i need a script that resizes them.

Bojan Živković11378569
Community Expert
Community Expert
June 28, 2022

One way that you may want to try using actions is to convert layer (I am assuming you have normal layers) to Smart Object then edit SO using Fit Image to resize to certain dimension then to save file and perhaps rasterize or Convert To Layers. There is limitation using actions which perhaps can be solved using Conditional Actions. For example: if you have Background layer it can be set to continue playing action when encouteres Bg layer but to run action to convert and resize layer when normal layer is currently selected. There are probably and more solutions which I can not think of and check right now.

Known Participant
June 28, 2022

I did not quite get there trying using this method