Skip to main content
dublove
Legend
July 27, 2022
質問

Does Photoshop have a script that enlarges the canvas to fit the picture.

  • July 27, 2022
  • 返信数 4.
  • 654 ビュー

Does Photoshop have a script that enlarges the canvas to fit the picture.

I know that you can cut and shrink the canvas to fit the picture.

But if you zoom in, you can also drag the canvas tool, but sometimes it seems very inconvenient and a little slow.

It would be great if there were a script that could make the canvas fit the picture,

Whether you zoom in or out.

 

You also need a script that can fit the picture to the canvas, and zoom in proportionally.

Thank you very much.

このトピックへの返信は締め切られました。

返信数 4

Legend
July 29, 2022

This script zooms to 100%, but you could change the zoom level as needed.

 

#target Photoshop

main();

function main(){
app.preferences.keyboardZoomResizesWindows = true;
runMenuItem(stringIDToTypeID('actualPixels'));
app.preferences.keyboardZoomResizesWindows = false;
return;
}
dublove
dublove作成者
Legend
July 29, 2022

Instead of zooming in, zoom out of the canvas view.

Instead, zoom in or out to fit the image.

Or: reduce the image, or enlarge the image to fit the canvas.

 

Is this the same? There seems to be a difference.

 

 

 

didiermazier
Community Expert
Community Expert
July 28, 2022

You could try Layers > New > New artboard based on layers (don't know the exact english menu word). It would create a new artboard with the selected layer size.

Stephen Marsh
Community Expert
Community Expert
July 27, 2022

@dublove - Image > Reveal All

 

It can be put into an action.

 

Here it is in scripted form:

 

activeDocument.revealAll();

 

 

davescm
Community Expert
Community Expert
July 27, 2022

'- Image > Reveal All '

 

and its opposite - Image >Trim

 

Dave

Legend
July 27, 2022

Are you mean crop by zoom tool? о_О 

 

Месье знает толк...

 

It's certainly an interesting task, but do you really need to resize the canvas that often?