Jump to content

Problems resizing to specific width or height ONLY using Macro + Batch

Recommended Posts

I'm very new to Affinity Photo so am getting to know where it really shines and where it falls short. By no means was I adept at Photoshop, but I found it essential for recording Actions. Unfortunately I've run into some issues using Affinity Photo's Macros in Batch jobs. The main one being that if I have a folder full of images that are in different aspect ratios (3:2, 4:3) it seems I am unable to record a Macro that resizes to a specific width or height ONLY.

When I record a Macro and resize a 4:3 file to say 800px wide, with the size locked the height of course becomes 600px. If I run that Macro as a Batch on the folder of mixed aspect ratio images, the images that are in 3:2 ratio are resized to 800px x 600px, so they're badly distorted. So the Macro records the dimensions of BOTH edges when the resizing takes place, rather than only the edge you actually edit (as is the case in Photoshop).

Is there an obvious solution to this that I am missing?

Link to comment
Share on other sites

2 minutes ago, HVDB Photography said:

Did you try  File > New Batch Job 

Batch resize.jpg

I did not, but I suspect that'll do the job – thanks! I just presumed that the Macro would need to be where the resizing takes place, but this does look like the solution. I'll report back...

Link to comment
Share on other sites

The solution posted above by HVDB Photography does indeed work, but what this option doesn't allow for is changing the dpi at the same time as doing the resizing (ie changing a full resolution 300dpi file to a 800px wide 72dpi file). A Macro doesn't allow for this either as the same issue arrises as per my original post in that the new dimensions that are the result of changing the dpi become a step in the Macro, which prevents the Macro from being useable for a Batch that involves images of differing aspect ratios.

To achieve what I wanted to this evening I had to use a combination of a Photoshop Action to resize to 72dpi, and then the Batch job in Affinity Photo to resize a folder of mixed aspect ratio images to 80px wide. Not ideal, but it'll do for now.

If there's a solution for these issues in Affinity Photo I would love to hear them. If not, I'd like to think these issues could be addressed in an update. Do Serif monitor these threads for suggestions and ideas as to how they can improve their product, or do we have to go somewhere to specifically put forth our suggestions?

Link to comment
Share on other sites

  • 9 months later...
On 11/25/2018 at 1:07 AM, carl123 said:

Create a macro that just changes the DPI to 72dpi (with resample set to off/unticked)

In the New batch Job screen set your width to 800px. IMPORTANT: Click the "more" button and untick Embed Metadata

Add your macro to the New Batch Job screen and run the batch job

So I am 95% sure that you are giving the answer I've been looking for for ages, I'm 99% sure I'm doing it correctly, but still my images turn out skewed, sometimes. Interestingly, it's also random (i.e. not all landscape images are stretched, just some are). Any pointers as to what might be the reason? 

Attaching two photos from the same batch job for reference

no skewed.png


Link to comment
Share on other sites

If it happens consistently with specific images you need to upload a couple of them for testing, also please specify what settings you are using in the New Batch Job screen and include your macro

There have been lots of updates in the last year so maybe something has changed in the way it works

Link to comment
Share on other sites

The 72 DPI Web Resolution Myth

Read this first ....




You'll 'need to create a macro using equations, see this thread

I created my own. See attachment
Give it a try ..


Resize Document to a Fixed Maximum Size .afmacros

Affinity Photo   -  Beta

Windows 10 Home  1909 (build 18363.657) - 64 bit processor - AMD A4-5000 APU with Radeon HD Graphics  1.50GHz - RAM 8,00 GB
Calibrated Monitor (Datacolor Spyder5 Pro)


Link to comment
Share on other sites

  • 2 years later...

There was a bug in reccording changing dpi in versions after 1.6. I produced a set of macros recorded in version 1.6 which do work OK in later versions.

See this thread on Change dpi macros.

Here is the the Macro Library: Change DPI 1.6.afmacros


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

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.

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.


  • Create New...

Important Information

Please note there is currently a delay in replying to some post. See pinned thread in the Questions forum. These are the Terms of Use you will be asked to agree to if you join the forum. | 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.