Jump to content

Recommended Posts

Posted

In Photoshop when I go to resize an image or resize the canvas one of the options, along with inches, pixels, millimetres et cetera is percentage. This allows me to create an action to create a white border or whatever colour I like around an image without worrying about what the resolution of the image is. I can add a 10% white border knowing that it will be proportionally correct no matter what resolution images to begin with. This seems like a pretty straightforward add for affinity. Could we get that in a future update?

Thanks very much,
Phil

I like turtles!

Windows 11

Sony A7iii

Sony A7riii

Sony A7Rii

Sony RX10 Mkiii

Canon G5x

Mavic Mini drone

A partridge

A pear tree (occupied)

www.philrosephoto.com

  • Staff
Posted

Hi Phil_rose,

You can use expressions and percentages in the input fields to achieve this. For example adding *50% to the end of an existing value (or just replacing it by 50%) will reduce it in half. This is applicable to the image and canvas size as well as input fields in the Transform panel and almost anywhere else. To learn more about for expressions for field input please check this Help topic. Not sure how well this is supported with Macros though.

 

Posted

Thanks for that. That makes sense. The problem is that you cannot include this in a macro since it does not record the percentages.

I like turtles!

Windows 11

Sony A7iii

Sony A7riii

Sony A7Rii

Sony RX10 Mkiii

Canon G5x

Mavic Mini drone

A partridge

A pear tree (occupied)

www.philrosephoto.com

Posted (edited)
17 hours ago, Phil_rose said:

The problem is that you cannot include this in a macro since it does not record the percentages.

You can use Equations to add borders by percentages

The attached macro will (hopefully) add a 10% border to the height and width of your images and fill them (the borders) with white

The macro is in 2 parts - part 1 calls part 2 when part 1 finishes.

You can rename part 1 but not part 2 as part 1 will no longer be able to find it.

As seen before you will sometimes get a 1px unexpected difference in size, so adding a 10% border to a 1000px image will give you a final size image of 1101px.  I believe this may be due to rounding up errors or bugs in the equations functions as all the maths looks correct.  (not much I can do about that at the moment)

You add the macros via the Library studio

 

Edit: Forgot to mention it should work on images up to 5000px on longest side larger ones may not work correctly

 

 

Add 10% white border macros.afmacros

Edited by carl123

To save time I am currently using an automated AI to reply to some posts on this forum. If any of "my" posts are wrong or appear to be total b*ll*cks they are the ones generated by the AI. If correct they were probably mine. I apologise for any mistakes made by my AI - I'm sure it will improve with time.

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.