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

Batch edit using macro to resize photos for web


Recommended Posts

I followed these instructions to batch edit my photos: https://affinity.help/photo/en-US.lproj/index.html?page=pages/Macros_Batch/batchjobs.html?title=Batch%20jobs as follows:

save as Jpeg width = 1500  length left blank, PPI at 75 using a sample image

The problem is, if the images in my batch are not exactly the same width as the sample to create the macro, my images are distorted. And vertical images become horizontal, or horizontal images become stretch out. I tried the same thing in Photoshop Cs6 using horizontal and vertical images but did not have this problem. Also, I can't find a save for web option that shows me what the image will look like when I reduce resolution size (as I can in Photoshop). Please advise. Thanks.

Link to comment
Share on other sites

Using resize does indeed set the original values. You will need to use the Distort > Equations filter.

Try this macro:

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

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

9 hours ago, llnaiman said:

The problem is, if the images in my batch are not exactly the same width as the sample to create the macro, my images are distorted.

Maybe I am missing something needed in your batch job but if all you want to do is set the width to 1500 px & scale the height proportionally, I don't think you need a macro for that. Just enter 1500 in the Width field & leave the Height field blank as you have done, & make sure the "Preserve Aspect Ratio" box is ticked, like this:

batch.jpg.da3e69f9ce18525392ae24a14fa03260.jpg

Does this not do what you want?

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

On 11/16/2019 at 11:46 PM, John Rostron said:

Using resize does indeed set the original values. You will need to use the Distort > Equations filter.

Try this macro:

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

Document > Clip Canvas
Layer > Rasterize and Trim

John

Thanks John. I tried what you suggested, but Rasterize is greyed out, and so is Distort > equations. Plus wouldn't this make my images square? They are rectangles. Also I still need to reduce the resolution.

Link to comment
Share on other sites

On 11/17/2019 at 2:05 AM, R C-R said:

Maybe I am missing something needed in your batch job but if all you want to do is set the width to 1500 px & scale the height proportionally, I don't think you need a macro for that. Just enter 1500 in the Width field & leave the Height field blank as you have done, & make sure the "Preserve Aspect Ratio" box is ticked, like this:

batch.jpg.da3e69f9ce18525392ae24a14fa03260.jpg

Does this not do what you want?

R C-R I tried as you suggested without making a macro and it worked. Thanks! (Doing the same thing as a macro did not work)

Link to comment
Share on other sites

8 hours ago, llnaiman said:

Thanks John. I tried what you suggested, but Rasterize is greyed out, and so is Distort > equations. Plus wouldn't this make my images square? They are rectangles. Also I still need to reduce the resolution.

I don't know why Rasterize and Distort are not available, but if @R C-R's solution works then go for it.

In my macro, both x and y have the same scaling factor, (w/1500) so the aspect ratio is preserved.

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

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.