blurpderp Posted September 16, 2022 Share Posted September 16, 2022 Newbie here. I'm wondering if it's possible to create a batch job and macro to do this: Open an afphoto document (background), add an image to the afphoto doc, resize the newly added image, and then move that image to a certain spot. I'm struggling to come up with a macro to do this and don't want to do this process manually for 600+ photos 😢 Any help is greatly appreciated! Quote Link to comment Share on other sites More sharing options...
smadell Posted September 16, 2022 Share Posted September 16, 2022 Of the 4 steps you mentioned, all but the 2nd one can be done with a simple Batch Job. As to step 2, when you say “add an image to the afphoto doc” is it the same image each time? If so, that could be coded into a macro, which itself could be incorporated into the Batch. The order of things would be important, too, especially if the size of the original image(s) and the added image were not the same, or at least consistent. Quote Affinity Photo 2, Affinity Publisher 2, Affinity Designer 2 (latest retail versions) - desktop & iPad Culling - FastRawViewer; Raw Developer - Capture One Pro; Asset Management - Photo Supreme Mac Studio with M2 Max (2023}; 64 GB RAM; macOS 13 (Ventura); Mac Studio Display - iPad Air 4th Gen; iPadOS 17 Link to comment Share on other sites More sharing options...
Junkbox Posted September 16, 2022 Share Posted September 16, 2022 by "add an image" are you speaking of a 'watermark' ? Quote Link to comment Share on other sites More sharing options...
blurpderp Posted September 16, 2022 Author Share Posted September 16, 2022 8 hours ago, smadell said: Of the 4 steps you mentioned, all but the 2nd one can be done with a simple Batch Job. As to step 2, when you say “add an image to the afphoto doc” is it the same image each time? If so, that could be coded into a macro, which itself could be incorporated into the Batch. The order of things would be important, too, especially if the size of the original image(s) and the added image were not the same, or at least consistent. The background would be the same but the "add image" would be a different image each time. What I'm trying to do automate is adding player photos to a sports background and there are around 600 photos I have to do this for. Quote Link to comment Share on other sites More sharing options...
blurpderp Posted September 16, 2022 Author Share Posted September 16, 2022 8 hours ago, Junkbox said: by "add an image" are you speaking of a 'watermark' ? Nope, just trying to add different player pictures to a sports background, but manually doing it for 600+ photos will be tedious. Quote Link to comment Share on other sites More sharing options...
John Rostron Posted September 16, 2022 Share Posted September 16, 2022 It might be easier to focus on the 600 player images and to add a background to each. One of the quirks the Affinty macros is that when you copy and paste, the image pasted is the one that you used when you recorded the macro. You can turn this to your advantage by loading the background image into the clipboard. Ensure you have the Transform Panel visible before you start recording. You will need to know the coordinates of where your image is going to be. Then, record the macro: Paste the background image from the clipoard, Move the new pasted layer down one (Arrange > Move to Back), Unlock (Click on the lock icon on the top layer), Clip Canvas (Document > Clip Canvas), Set the current selection, click on the top layer and select 'Select layer one above current', Position the top layer using the Transform Panel, Merge the two layers (Document > Flatten). This works as a single macro, but I have not tried it as a batch job yet. John blurpderp 1 Quote 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 More sharing options...
v_kyr Posted September 16, 2022 Share Posted September 16, 2022 50 minutes ago, blurpderp said: The background would be the same but the "add image" would be a different image each time. What I'm trying to do automate is adding player photos to a sports background and there are around 600 photos I have to do this for. Always one image per/on one background, or instead multiple images on one background image here? - However for 600 images instead look for the right tools for this wanted job, like for example ... ImageMagick Examples of ImageMagick Usage ImageMagick samples -- Multi-Image Layers Simplest to add a background image to a batch of images ... etc. ... or some Python scripting ... Concatenate images with Python, Pillow ... etc. 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...
blurpderp Posted September 16, 2022 Author Share Posted September 16, 2022 4 hours ago, John Rostron said: It might be easier to focus on the 600 player images and to add a background to each. One of the quirks the Affinty macros is that when you copy and paste, the image pasted is the one that you used when you recorded the macro. You can turn this to your advantage by loading the background image into the clipboard. Ensure you have the Transform Panel visible before you start recording. You will need to know the coordinates of where your image is going to be. Then, record the macro: Paste the background image from the clipoard, Move the new pasted layer down one (Arrange > Move to Back), Unlock (Click on the lock icon on the top layer), Clip Canvas (Document > Clip Canvas), Set the current selection, click on the top layer and select 'Select layer one above current', Position the top layer using the Transform Panel, Merge the two layers (Document > Flatten). This works as a single macro, but I have not tried it as a batch job yet. John Hey John, this is a great idea! Never thought to do it this way. Definitely going to give this a shot, thanks! Quote Link to comment Share on other sites More sharing options...
blurpderp Posted September 16, 2022 Author Share Posted September 16, 2022 3 hours ago, v_kyr said: Always one image per/on one background, or instead multiple images on one background image here? - However for 600 images instead look for the right tools for this wanted job, like for example ... ImageMagick Examples of ImageMagick Usage ImageMagick samples -- Multi-Image Layers Simplest to add a background image to a batch of images ... etc. ... or some Python scripting ... Concatenate images with Python, Pillow ... etc. It'll be one background and one player image. I have another job that will be multiple images and one background for a team shot with 1 player photo. Thanks for recommending ImageMagick. Going to look into that, seems like a powerful tool. Thanks! Quote Link to comment Share on other sites More sharing options...
blurpderp Posted September 18, 2022 Author Share Posted September 18, 2022 On 9/16/2022 at 9:25 AM, John Rostron said: It might be easier to focus on the 600 player images and to add a background to each. One of the quirks the Affinty macros is that when you copy and paste, the image pasted is the one that you used when you recorded the macro. You can turn this to your advantage by loading the background image into the clipboard. Ensure you have the Transform Panel visible before you start recording. You will need to know the coordinates of where your image is going to be. Then, record the macro: Paste the background image from the clipoard, Move the new pasted layer down one (Arrange > Move to Back), Unlock (Click on the lock icon on the top layer), Clip Canvas (Document > Clip Canvas), Set the current selection, click on the top layer and select 'Select layer one above current', Position the top layer using the Transform Panel, Merge the two layers (Document > Flatten). This works as a single macro, but I have not tried it as a batch job yet. John Hey John, I gave this a shot and it worked like a charm!! Thanks so much for the suggestion and how to! John Rostron 1 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.