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

Recommended Posts

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!

Link to comment
Share on other sites

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.

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

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.

Link to comment
Share on other sites

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:

  1. Paste the background image from the clipoard,
  2. Move the new pasted layer down one (Arrange > Move to Back),
  3. Unlock (Click on the lock icon on the top layer),
  4. Clip Canvas (Document > Clip Canvas),
  5. Set the current selection, click on the top layer and select 'Select layer one above current',
  6. Position the top layer using the Transform Panel,
  7. Merge the two layers (Document > Flatten).

This works as a single macro, but I have not tried it as a batch job yet.

John

Windows 11, Affinity Photo 2.4.2 Designer 2.4.2 and Publisher 2.4.2 (mainly Photo).

CPU: Intel Core i5 8500 @ 3.00GHz. RAM: 32.0GB  DDR4 @ 1063MHz, Graphics: 2047MB NVIDIA GeForce GTX 1050

Link to comment
Share on other sites

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 ...

... or some Python 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

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:

  1. Paste the background image from the clipoard,
  2. Move the new pasted layer down one (Arrange > Move to Back),
  3. Unlock (Click on the lock icon on the top layer),
  4. Clip Canvas (Document > Clip Canvas),
  5. Set the current selection, click on the top layer and select 'Select layer one above current',
  6. Position the top layer using the Transform Panel,
  7. 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!

Link to comment
Share on other sites

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 ...

... or some Python scripting ...

 

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!

Link to comment
Share on other sites

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:

  1. Paste the background image from the clipoard,
  2. Move the new pasted layer down one (Arrange > Move to Back),
  3. Unlock (Click on the lock icon on the top layer),
  4. Clip Canvas (Document > Clip Canvas),
  5. Set the current selection, click on the top layer and select 'Select layer one above current',
  6. Position the top layer using the Transform Panel,
  7. 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!

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.