Jump to content
moonbeetle

Affinity Photo: How can I batch resize to a max width, variable height?

Recommended Posts

I have hundreds of images of various sizes, mostly very large sizes, that I want to resize to a maximum width of 1920px, at 72DPI, RGB colour mode, JPG format. The height should be variable since the original images have various heights as well and I need to keep the aspect ratio to prevent distortions. (1)is this possible with Affinity Photo? (2)what would be the steps for the resizing to record as a macro. (I tried recording resizing one image and then use that recording for a batch job but AP used also a fixed height on every image resulting in many distorted images)

Share this post


Link to post
Share on other sites

Hi Moonbeetle,

Welcome to the forums 

You should be able to do this by going to File New > Batch and set the width to 1920px then leave the height blank this should do what you are looking for :) 

C


Please tag me using @ in your reply so I can be sure to respond ASAP.

Share this post


Link to post
Share on other sites

Here I am 12 months later and looking for the same solution. Wow ..... It is so simple, and it works. Thank you to all posters seeking knowledge which can also benefit others like me.

Share this post


Link to post
Share on other sites

If you're using an older mac which runs the latest version of OS X you'll probably need to disable "Parallel processing" (bottom left corner of the batch window) in order to run a batch job.

Share this post


Link to post
Share on other sites

Just to throw a thanks. As I was having this challenge all the time when on computers without digiKam. And I was forced to use a some third party apps etc to get around the problem.

Now I can just use the AP as I didn't never open the "New Batch" function.... 

Share this post


Link to post
Share on other sites
18 hours ago, rob_smith said:

Unfortunately, there is no option to set/change size in the New->Batch window.

Do you not see the W & H fields in the New Batch Job window?

408292193_newbatchjob.jpg.56bc3d640cfce7384c7d18c190ea381c.jpg


Affinity Photo 1.8.4, Affinity Designer 1.8.4, Affinity Publisher 1.8.4;  2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 40GB RAM; macOS 10.15.6
Affinity Photo 
1.8.4.186 & Affinity Designer 1.8.4.4 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 13.3.1

Share this post


Link to post
Share on other sites

Hello,

I have an interesting question about this. What if the resize element is in the middle of marco?

My case:
I have a lot of bikes photos (different sizes) on a white background. And I want them trimmed a bit, add the same margin and change the layout from horizontal to square.
The macro for this:

1. Flood select (3%, contiguous) - select the background in top left corner
2. Unlock the layer
3. Delete selection
4. Document > Clip canvas
5. Resize image (unfortunately every bike is in other size): Width= 1200 and lock proportions
6. Resize canvas: 1200x1200px

And everything would be great if "lock proportions" would work instead of the problem described above :)

In Photoshop it was at least two ways I could do it: a) lock proportions was warking b) could set percentage setting canvas (to have the same margins...).

So, do you have any idea how to Resize canvas first to have a square layout and the same margins after saving and resizing to 1200x1200?
Or should I stop at 4, set resize on the batch process, then another macro on resizing canvas...?

Thanks in advance for help.

PS. Where can I add a feature request like: locking the proportions in macro; trimming the image on a uniform background?

 

Share this post


Link to post
Share on other sites
1 hour ago, neoDIRECT said:

PS. Where can I add a feature request like: locking the proportions in macro; trimming the image on a uniform background?

In the appropriate Feature Request forum :)


-- Walt

Windows 10 Home, version 2004 (19041.388),
   Desktop: 16GB memory, Intel Core i7-6700K @ 4.00GHz, GeForce GTX 970
   Laptop:  8GB memory, Intel Core i7-3625QM @ 2.30GHz, Intel HD Graphics 4000 or NVIDIA GeForce GT 630M
Affinity Photo 1.8.5.703 and 1.9.0.734 Beta   / Affinity Designer 1.8.5.703 and 1.9.0.734 Beta  / Affinity Publisher 1.8.5.703 and 1.9.0.742 Beta.

Share this post


Link to post
Share on other sites
13 hours ago, neoDIRECT said:

1. Flood select (3%, contiguous) - select the background in top left corner
2. Unlock the layer
3. Delete selection
4. Document > Clip canvas
5. Resize image (unfortunately every bike is in other size): Width= 1200 and lock proportions
6. Resize canvas: 1200x1200px

At first glance, everything looks like it should be achievable in one macro, with Step 5 probably needing an Equations Filter.


But I'm a little concerned over Step 1 which looks like it could give unpredictable results depending on the image. 

If I was looking to trim each image by the same set pixel amount I would probably use a selection then grow/shrink the selection in pixels and delete them that way.

Or if I was looking to trim the image by a set percentage amount relative to each image I would probably use another Equations Filter and delete them that way


Due to the fact that Boris Johnson is now our Prime Minister, punctuation, spelling and grammar will never be worried about ever again.  We now have far bigger problems to be worried about.

Share this post


Link to post
Share on other sites
On 12/10/2019 at 6:46 AM, carl123 said:

At first glance, everything looks like it should be achievable in one macro, with Step 5 probably needing an Equations Filter.


But I'm a little concerned over Step 1 which looks like it could give unpredictable results depending on the image. 

Hi in this case - at Step 1 it was always white colour, so it definitely is not a universal solution.

And how could I use an Equations Filter to resize an image? It seems a bit advanced to me  :/

 

 

Share this post


Link to post
Share on other sites

@moonbeetle, @neoDIRECT,

Try this:

Layer > Unlock
Layer > Rasterize
Filter > Distort > Equations
    Enter the following in the x and y fields, then Apply
x=x*w/1200
y=y*w/1200

Document > Clip Canvas
Layer > Rasterize and Trim

John


Windows 10, Affinity Photo 1.8,5 Designer 1.8.5 and Publisher 1.8.5 (mainly Photo), now ex-Adobe CC

CPU: AMD A6-3670. RAM: 16 GB DDR3 @ 666MHz, Graphics: 2047MB NVIDIA GeForce GT 630

Share this post


Link to post
Share on other sites

Very similar to what I was looking for as well! I have to resize images for our photo club site. In Photoshop I have an action that will resize the width to 600px and the height will scale appropriately then add a square frame in white around the entire image. I Affinity the macro will do all that except the height will be the same as the image I used to create the macro - throwing off the dimensions!

Image 1: Original 8x10 test image.

Image 2: after resizing and adding border (recorded this as a macro)

Image 3: Image 2 with border added to show the result more clearly.

Image 4: Image 3 after macro was run. The entire image is square as it should be but it has resized the original square to 8x10 ratio.

However, the batch processing to resize works perfectly! Maybe I can combine that with a macro?

Test_Image.JPG

Test_Image2.JPG

Test_Image3.JPG

Test_Image4.JPG

Share this post


Link to post
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

Please note the Annual Company Closure section in the Terms of Use. 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.