btymosiak Posted April 29 Posted April 29 (edited) Hello everyone! I'm new here and I come with an important question. I have a problem with automating the process of pasting images into a place on a prepared mockup. I would like to streamline this process because manually entering hundreds of images and saving them later is time-consuming. I have a mockup (several versions) for selling posters/photos and I set the layers in Affinity so that after loading the image using the Apply Image function, it automatically sets the appropriate proportions and adjusts the loaded image to the mockup (perspective correction, mask, etc.): It works the way I want, but when I have to upload several hundred images in this way, it becomes a problem. I wanted to speed it up and tried to record a Macro with image replacement + automate the process via Batch Job, but unfortunately it doesn't work, i.e. it only creates a copy of the input data. Do you know any way to streamline this? Some plugin? I tried to make a Python script that clicks the appropriate functions one by one, but so far I don't have satisfactory results. Edited April 29 by btymosiak Quote
carl123 Posted April 29 Posted April 29 Can you upload the Affinity document (shown above), the macro and the base image to the forum? 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.
btymosiak Posted April 29 Author Posted April 29 Yes, included Maybe the Macro should be expanded somehow, but it doesn't record the image selection itself. Same with preferred save settings. Or maybe it can't be done via Macro 🤔 mockup_ApplyImage.afmacro mockup_posters.afphoto Quote
btymosiak Posted May 5 Author Posted May 5 Have any of you ever done something like this? Had hundreds of files to swap and managed to automate it? Any help?🙃 Quote
bengrau Posted May 5 Posted May 5 Sorry I have no solution, just having a similar setup but no automation. I do have a problem with blurry images. Did you ever come across blurry images in your mockups? Do you link or embed your files? Quote
btymosiak Posted May 5 Author Posted May 5 No, I don't have a problem with that. Do you have blurry images in the viewport or after export too? In this case, when using the Apply Image filter, the images are embedded, when I upload images using the Place function, I try to link them. Quote
David in Яuislip Posted May 5 Posted May 5 I can't read your files as I use V1 but I would take a different approach as the macro copy/paste is not going to substitute images as you need Use Photo batch to produce picture files of the correct size with the perspective applied Produce seperate files for the background and foreground. I've used a frame in front of the picture, you may prefer to have the frame as part of the background with the picture on top but that will need more accurate positioning Use imagemagick to stitch them together, the example was made from 4 files This command should be a good starting point magick background.png -draw "image over 386,126 0,0 picture.png" frame.png foreground.png -background none -alpha set -flatten result.png The 386,12 represents the x,y dimensions from the top left, adjust as necessary as I used an image 800x600px Then you'll need to use a shell script appropriate for your OS, using windows it'd be a simple bat file with a loop Good luck btymosiak 1 Quote Microsoft Windows 11 Home, Intel i7-1360P 2.20 GHz, 32 GB RAM, 1TB SSD, Intel Iris Xe Affinity Photo - 24/05/20, Affinity Publisher - 06/12/20, KTM Superduke - 27/09/10
drpixels Posted May 5 Posted May 5 i know your post is about doing this in photo but with data merge in publisher it can be done very easily, with a csv file. btymosiak 1 Quote
btymosiak Posted May 6 Author Posted May 6 @drpixels I hadn't thought of that. Now it seems obvious - I'll see how it works. Thanks! @David in Яuislip Your proposal is extensive, but I'll check how it works. Maybe I'll learn something new. Thanks! I'm going to keep trying, if I have any new questions or problems I'll ask 🙂 Quote
btymosiak Posted May 15 Author Posted May 15 On 5/5/2025 at 11:27 PM, drpixels said: i know your post is about doing this in photo but with data merge in publisher it can be done very easily, with a csv file. After few days I tried your solution and it works perfectly! It's that simple now! Thank you! drpixels 1 Quote
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.