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

Borders in macros -- different horizontal Vs vertical


Recommended Posts

Hello, why is it so?
I make a macro to add a border to a 11x14 inch vertical photo as in first photo
However, if the image is rotated 90 decrees and the same macro is added it appears as in second --- the image is not centered .
Why is that so? Been puzzling , and annoying me for a long time .
PS Have changed the border to black so it's easier to see
Cheers

Riverside Colignan 23 0413  072-x w.jpg

Riverside Colignan 23 0413  072xx w.jpg

Link to comment
Share on other sites

It would be easier to help you if you included the *.afphoto file & the macro, or at least tell us what step(s) are in the macro & how you created it.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

20 hours ago, R C-R said:

It would be easier to help you if you included the *.afphoto file & the macro, or at least tell us what step(s) are in the macro & how you created it.

Sorry -- had forgotten but will do it soon :)

Link to comment
Share on other sites

For future reference, all you should need to do, @ianrb, is drag/drop them onto a post here. Or click the "choose files..." link at the bottom of the composition window when posting.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

  • Staff

Hi @ianrb,

Thanks for providing these files!

I can confirm that Macro Transforms work based on a Scaled Percentage of the X & Y values, therefore when your macro is recorded in portrait your transform is applying a 97% scale transform to the X value, and a 98% scale transform to the Y value.

Applying this macro to a landscape image then applies these scaled percentages to 'swapped' values from the original recording, resulting in unexpected results.

Therefore I would recommend creating 2 different versions of this macro - one for Vertical images and one for Horizontal, to ensure the correct scaling percentage is being applied to the expected axis value.

I hope this helps :)

Please note -

I am currently out of the office for a short while whilst recovering from surgery (nothing serious!), therefore will not be available on the Forums during this time.

Should you require a response from the team in a thread I have previously replied in - please Create a New Thread and our team will be sure to reply as soon as possible.

Many thanks!

Link to comment
Share on other sites

11 hours ago, walt.farrell said:

For future reference, all you should need to do, @ianrb, is drag/drop them onto a post here. Or click the "choose files..." link at the bottom of the composition window when posting.

Cheers mate , I was actually doing that but thought a 32mg file would not go through

Link to comment
Share on other sites

9 hours ago, Dan C said:

Hi @ianrb,

Thanks for providing these files!

I can confirm that Macro Transforms work based on a Scaled Percentage of the X & Y values, therefore when your macro is recorded in portrait your transform is applying a 97% scale transform to the X value, and a 98% scale transform to the Y value.

Applying this macro to a landscape image then applies these scaled percentages to 'swapped' values from the original recording, resulting in unexpected results.

Therefore I would recommend creating 2 different versions of this macro - one for Vertical images and one for Horizontal, to ensure the correct scaling percentage is being applied to the expected axis value.

I hope this helps :)

Thanks @Dan; thought that would be the answer and is OK for V 11x14 and H11x14 , however if a different ratio is used would require  different macros .
The white border in the macro is a new thing . I do have a macro to just add the stroke which is easy enough to manually reposition around the edge or a little inside the edge
Cheers


 

Link to comment
Share on other sites

7 minutes ago, ianrb said:

...however if a different ratio is used would require  different macros...

Which shows the overall limitations (and useless idiosyncosity) of Affinity's macro implementation. There's no real way to auto determine and deal with dynamic sizes and orientations for documents/images here, also there is no file i/o and dynamic text handling support etc. - All in all it's pretty useless for all those tasks, which can be done with other systems macro facilities in an elegant manner.

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

9 hours ago, v_kyr said:

Which shows the overall limitations (and useless idiosyncosity) of Affinity's macro implementation. There's no real way to auto determine and deal with dynamic sizes and orientations for documents/images here, also there is no file i/o and dynamic text handling support etc. - All in all it's pretty useless for all those tasks, which can be done with other systems macro facilities in an elegant manner.

I have to agree ; the macro system is rather messy .
Instead of make big/complicated macros, I find it easier to make a number of smaller macros and then make those smaller macros into a bigger one button macro . If changes are needed (seems often for me) I  just need to edit the small part and then remake the big macro

Cheers all

Link to comment
Share on other sites

47 minutes ago, ianrb said:

I have to agree ; the macro system is rather messy .
Instead of make big/complicated macros, I find it easier to make a number of smaller macros and then make those smaller macros into a bigger one button macro . If changes are needed (seems often for me) I  just need to edit the small part and then remake the big macro

Personally I don't hazzle around with APh and macros for such usually simple and silly to do tasks, instead I use things like ImageMagick and Python scripts to add borders and the like.

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

12 hours ago, v_kyr said:

Personally I don't hazzle around with APh and macros for such usually simple and silly to do tasks, instead I use things like ImageMagick and Python scripts to add borders and the like.

Never heard of those apps ; I wonder what else I don't know 😅
Maybe easier just not having using borders  !
I have this layer effects macro for adding border and shadow to layer images . Ratio makes does not any difference and it all adjustable . Once I have made adjustments to one it's just a case of copy + paste FX to other layers
Works well once I got the macro working , however there are limitations which I have forgotten now .
Bottom is the basic macro

Hawthorn 23 0417  78 w.jpg

Link to comment
Share on other sites

2 hours ago, ianrb said:

Never heard of those apps

Python is a very powerful interpreter based programming language, with a very rich module concept and which is also predestinated for scripting!

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

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.