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

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)

Link to comment
Share on other sites

  • 11 months later...
  • 1 month later...

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

Link to comment
Share on other sites

  • 4 months later...
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

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

  • 1 month later...

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?

 

Link to comment
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
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

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

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.

Link to comment
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  :/

 

 

Link to comment
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.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

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

Link to comment
Share on other sites

  • 8 months later...

I read through the above and I am working on the new batch job.  Is there a setting that I am not seeing that prevents an image from being scaled up to the max size?  I just ran a bunch of images and they fit in the resolution constraints but some images were scaled up.

Link to comment
Share on other sites

  • 2 years later...
On 5/23/2018 at 8:44 AM, Callum said:

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

I only use Affinity rarely, it's beyond my normal needs, so I often find it tricky. I've opened 130 images of diary pages which I want to make the same width before converting to pdf, but the OK button is greyed out and I wonder what I'm doing wrong. Cheers, CC

Screenshot 2023-05-15 at 13.16.49.png

Link to comment
Share on other sites

It does not look like you have added any files to be processed

 

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.

Link to comment
Share on other sites

1 hour ago, carl123 said:

It does not look like you have added any files to be processed

Which is done by clicking the "Add" button at the bottom of the window.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

  • 1 month later...

Hi there,

I have had the same problem, but the fixes given in this thread haven't worked for me.

I work with MacOS 12.6.6 on an iMac late 2015. I am getting distorted images, which is a problem with over 600 images to size convert.

Attached is a grab of the settings I am trying to work with.

Any help appreciated

Thanks

Screenshot 2023-06-27 at 12.57.10.jpg

Link to comment
Share on other sites

13 minutes ago, Nigel Kendall said:

I am getting distorted images, which is a problem with over 600 images to size convert.

It's probably your 300 DPI macro that's doing it, especially if it's one you created.

You can find some in the Resources forum that should work. Such as these: 

 

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

  • 6 months later...
18 hours ago, Utebue said:

I have a similar question but want to convert to CMYK, 300DPI, JPEG, 800W max. I had figured out the batch processing but cannot find a button to batch convert to CMYK. Help! 

You would create a Macro that converts your current image to CMYK, and Save the Macro in your Library, and specify that Macro in the Batch Job.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

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.