Jump to content
You must now use your email address to sign in [click for more info] ×

Resize portrait or landscape image to max side of fixed length


Recommended Posts

The problem is to devise a formula for use in a macro or batch to re-size an image so that the longest side is a fixed length. So if the target size  was (say) 800px, a 300×600 image would become 400×800px and a 2000×500px imge would become 800×200px.

 

Firstly, ensure that you have an unlocked pixel layer. Select the move tool. In the Transform panel, ensure that the width and height are linked.

Set Width as min(800, 800×w/h)

Given that the layers are linked, this will automatically set the height.

Now select Document > Clip Canvas. This removes the tranparent background.

One curious outcome is that for a 3000×4000 portrait image, after a successful transform/clip, The Transform panel gives the dimensions as width: 800:px by height:600px. The Document Resize gives it (correctly) as width:600px by height:800px.

Windows 10, Affinity Photo 1.10.5 Designer 1.10.5 and Publisher 1.10.5 (mainly Photo), now ex-Adobe CC

CPU: AMD A6-3670. RAM: 16 GB DDR3 @ 666MHz, Graphics: 2047MB NVIDIA GeForce GT 630

Link to comment
Share on other sites

  • 10 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.