Traveler Posted February 21, 2018 Share Posted February 21, 2018 I'm having trouble creating a macro that resizes document to fixed height or width. For example, I want a macro that resizes document to 600 pixels tall while automatically adjusting width to maintain original aspect ratio of current working image. I attempted this by clicking record>resize document>height 600 px>press tab key (to affect the width proportionately)>click Resize>click stop recording. The resulting macro seems to sometimes work properly and sometimes it distorts the image by not resizing the width proportionate to the height. Quote Link to comment Share on other sites More sharing options...
Staff stokerg Posted February 21, 2018 Staff Share Posted February 21, 2018 Hi Traveler, When you record the macro and tab to the width box it's locking in the width for that sized image. In my tests, i'm working with an image thats 2268px by 1701px and when i enter the width as 600 and tab to the next box the height is set as 450px. If i then stop recording the macro and run it on an image that doesn't match the original size of the image i recorded the Macro on, i get a distorted image as the macro is resizing to a width and height of 600 x 450 as that is what was recorded. If i run it on an image that is 2268px by 1701px, everything is fine. I can't see a way to do this with a Macro but you can do it with the batch command in Affinity. File>New Batch and here you can load a mix of image sizes and set the width to 600 and leave the height box blank and make sure you have A column ticked, as that will keep the aspect ratio. If you then run the batch, the images all be resized and will keep the original aspect ratio of the image. Quote Link to comment Share on other sites More sharing options...
v_kyr Posted February 21, 2018 Share Posted February 21, 2018 See also: Resize an image to a fixed maximum size ... and other related forum threads for this theme. John Rostron 1 Quote ☛ 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 More sharing options...
Traveler Posted February 21, 2018 Author Share Posted February 21, 2018 11 hours ago, stokerg said: 12 hours ago, stokerg said: Hi Traveler, When you record the macro and tab to the width box it's locking in the width for that sized image. In my tests, i'm working with an image thats 2268px by 1701px and when i enter the width as 600 and tab to the next box the height is set as 450px. If i then stop recording the macro and run it on an image that doesn't match the original size of the image i recorded the Macro on, i get a distorted image as the macro is resizing to a width and height of 600 x 450 as that is what was recorded. If i run it on an image that is 2268px by 1701px, everything is fine. I can't see a way to do this with a Macro but you can do it with the batch command in Affinity. File>New Batch and here you can load a mix of image sizes and set the width to 600 and leave the height box blank and make sure you have A column ticked, as that will keep the aspect ratio. If you then run the batch, the images all be resized and will keep the original aspect ratio of the image. Thanks for that, stokerg. Good to know I can do this with batch editing. Unfortunately, for this case I don't always know what size I want until I open the image and have a look. I actually prefer to have a few options set in my macros so I can quickly compare before committing. For example I would have one macro set to resize document to 600 px tall, one 700 px tall, and one 800 px tall. I may try one and then just undo and try another one before. Super easy to do this with Photoshop. But I'm sure that phrase has been mentioned far too many times on this forum already. Maybe we'll get this in ability in future update. Quote Link to comment Share on other sites More sharing options...
Traveler Posted February 21, 2018 Author Share Posted February 21, 2018 10 hours ago, v_kyr said: See also: Resize an image to a fixed maximum size ... and other related forum threads for this theme. Thanks V_KYR. I read the thread and am looking into using the distort feature. It seems like an unnecessarily complicated way to do this but some way is better than no way. I'm just curious if the distort method will cause a lower quality result since it looks like you can't specify the resize method (i.e. bilinear, bicubic, etc.). Quote Link to comment Share on other sites More sharing options...
carl123 Posted February 22, 2018 Share Posted February 22, 2018 13 hours ago, Traveler said: For example I would have one macro set to resize document to 600 px tall, one 700 px tall, and one 800 px tall. I may try one and then just undo and try another one before. Here is a link to a macro that should allow you to choose all those settings dynamically within the one macro. You may be able to adapt it to your workflow Quote 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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.