Skip to main content
coreyb32676214
Participant
April 16, 2017
Répondu

Creating an Action to Square the canvas size

Hi,

I am trying to create a recorded action that would resize the canvas to a square, with both height and width equal to the current height.

Here is where i have gotten stuck.

I start the recording

Go to image - canvas size

copy the value in the height

tab to the width and paste the value

hit ok

end recording

at this point I have my square image, but...

If I open a differently sized image and play the action, it resizes to the height of the image that was being worked on during the recording

I have tried creating two actions.

the first copies the width and then pastes it into a text layer, the Second copy that into the height box in canvas size

but this also failed, and the first action resulted in the value for the height of the original image to be pasted into the text box.

Please help,

I have to do this to 350 pictures ever week and need an action.

    Ce sujet a été fermé aux réponses.
    Meilleure réponse par JJMack

    The action would need to use a Photoshop Script step to  do that.  Actions can not use logic to find out a document current  width and height and use that information to add canvas to make the document  square.  A Photoshop Scripts can.    Using Adobe Plug-in Script Fit Image it would be easy but a little tricky to record an action to resize all images to fit within some square canvas size then make the canvas that size.  If a single canvas size will do you you would not need to write the Photoshop script yourself.  If you want to use the current image''s side sizes and to use the longest to make the other the same. You would need to find a script written to do that or write the script yourself.  

    It would not be a difficult script to write.   Its just involves looking at the width and height.

    if document width is greater than the document height then make canvas  size document width by document height.

    else if document height is greater then the document width then make document canvas document height by document height

    else do nothing it is square.

    1 commentaire

    JJMack
    Community Expert
    JJMackCommunity ExpertRéponse
    Community Expert
    April 16, 2017

    The action would need to use a Photoshop Script step to  do that.  Actions can not use logic to find out a document current  width and height and use that information to add canvas to make the document  square.  A Photoshop Scripts can.    Using Adobe Plug-in Script Fit Image it would be easy but a little tricky to record an action to resize all images to fit within some square canvas size then make the canvas that size.  If a single canvas size will do you you would not need to write the Photoshop script yourself.  If you want to use the current image''s side sizes and to use the longest to make the other the same. You would need to find a script written to do that or write the script yourself.  

    It would not be a difficult script to write.   Its just involves looking at the width and height.

    if document width is greater than the document height then make canvas  size document width by document height.

    else if document height is greater then the document width then make document canvas document height by document height

    else do nothing it is square.

    JJMack