Skip to main content
Participant
January 8, 2023
解決済み

Photoshop script to fill canvas without cropping

  • January 8, 2023
  • 返信数 3.
  • 528 ビュー

Hi everyone!

I am looking for a script that would resize the selected layer to fill the canvas without cropping and center it.

As I have no coding background, I was trying to have a script writte by AI, but I couldnt make it work perfectly.

A solution would be greatly appreciated.

Thanks, Alex

このトピックへの返信は締め切られました。
解決に役立った回答 Stephen Marsh

There are many example scripts on the forum, here are two.

 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/fit-layer-to-canvas-keeping-aspect-ratio/m-p/10519295#M252048

 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/image-fit-to-canvas-option/m-p/10481852#M247430

 

If these don't help, it may be best to clearly state how you wish landscape orientation layers should be handled in portrait canvas... And how portrait orientation layers are to be handled in landscape canvas. Do you wish the layer to be stretched/distorted to fit, or proportionally scaled with letterboxing etc.

 

Visual examples with before/after are also great for clearly communicating your goals.

返信数 3

Mephist0作成者
Participant
January 8, 2023

Thank you very much, I can use all of the mentioned scripts, probably solved some problems which I didnt know I had as well 🙂

Stephen Marsh
Community Expert
Stephen MarshCommunity Expert解決!
Community Expert
January 8, 2023

There are many example scripts on the forum, here are two.

 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/fit-layer-to-canvas-keeping-aspect-ratio/m-p/10519295#M252048

 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/image-fit-to-canvas-option/m-p/10481852#M247430

 

If these don't help, it may be best to clearly state how you wish landscape orientation layers should be handled in portrait canvas... And how portrait orientation layers are to be handled in landscape canvas. Do you wish the layer to be stretched/distorted to fit, or proportionally scaled with letterboxing etc.

 

Visual examples with before/after are also great for clearly communicating your goals.

c.pfaffenbichler
Community Expert
Community Expert
January 8, 2023

Good one, I had not picked up on the non-proportional implication of the wording. 

c.pfaffenbichler
Community Expert
Community Expert
January 8, 2023
Naturally scaling the Layers as plain pixel Layers would be a bad idea, so assuming they are Smart Objects the second Script in this thread might help: