Eddie Evz Posted August 26, 2020 Share Posted August 26, 2020 Hi Guys, I'm pretty new to Affinity and have used it for all sorts of cool stuff, but I've picked it up recently to do a task I thought it might handle quite easily. I have product images of different dimensions, all random, and I usually define the longest dimension which is the width down to 800 px and keep the aspect ratio of the image. The result is a batch of images with the same width 800 px, but variable height e.g. 645 px, 721 px, 434 px. To tidy up the image and keep a uniform shape I'd like to add a white background of 800 px , 800 px with the resized imaged centred on top of that background. I won't be able to achieve it manually as there are coming on 10,000 images. Is there some functionality that I'm not utilising? I've looked around batch jobs, and had no success with macro's as the saved macro will only run off the applied rules given to the specific image the macro was recorded upon. I've got stuck with the transform marco command as it is working via a percentage and not a finite pixel value, and will apply a white background of varying height dimensions to any image given to process. Does anyone have any ideas how to achieve this? many thanks in advance, Eddie Quote Link to comment Share on other sites More sharing options...
carl123 Posted August 27, 2020 Share Posted August 27, 2020 5 hours ago, Eddie Evz said: The result is a batch of images with the same width 800 px, but variable height e.g. 645 px, 721 px, 434 px. Off the top of my head and assuming you have already resized the images as above... Add (or paste) a white rectangle (size 800 x 800px) at x=0, y=0 coordinates Arrange > Move to back Document > Unclip canvas 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...
Eddie Evz Posted August 27, 2020 Author Share Posted August 27, 2020 Many thanks Carl, that does get around the transform issue within the macro. I'm still having trouble pasting the 800x800 square in the centre of the image, it seems to either fix to the top or bottom, or slightly skewed left or right etc. I've tried the different paste options without success, when you say paste at the correct coordinates, how do I define the paste parameters so the white square will always be applied to the centre of the image, irrespective of the images variable height, is there a paste function that states, "paste centre" of image? Quote Link to comment Share on other sites More sharing options...
Eddie Evz Posted August 27, 2020 Author Share Posted August 27, 2020 just found it! align middle option, it will give the "arrange node" command in the macro instead of a transform and always centres in the middle, many thanks carl, you were a great help! Quote 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.