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

Unable to increase the resolution for images with different sizes using a batch job in Affinity Photo


Recommended Posts

I searched the forum and can't find a post with this particular issue.

I'm trying to increase the resolution of several images in a folder from 96 dpi to 300 dpi for paperback printing. The images have different dimensions, so I don't want them to all be the same size. I have been able to do this in the past with a Photoshop action and batch job, and PS will automatically set the new size for each image after resampling to 300 dpi. It does not apply the same size to all the images.

I've tried to do the same with a macro and batch job in Affinity Photo, but it sets all the images to the same size (using the one used to record the macro) hence badly distorting most of the images. It seems there is no way of recording the macro without the size being hardcoded.

Is there any way of increasing the DPI of images (and resampling the images) using a batch job in Affinity Photo without setting all the images to the same size?

Any help will be much appreciated.

Link to comment
Share on other sites

Try the attached macro

 

Change DPI to 300.afmacros

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/26/2019 at 7:49 AM, carl123 said:

Try the attached macro

 

Change DPI to 300.afmacros

Thanks for the macro, but how do you import it to Affinity Photo? I tried the import function in the Macro panel but it does not allow me to select the file. The file does not show up at all to be selected in the dialog box even though it is in the directory.

Link to comment
Share on other sites

You use the Library panel to import it

If a file ends in .afmacro you use the Macro panel to import it

If the file ends in .afmacros you use the Library panel

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/26/2019 at 7:49 AM, carl123 said:

Try the attached macro

 

Change DPI to 300.afmacros

OK, I was able to import the macro and it works when combined with specifying the width (but not the height) in the batch job. If you don't set the width in the batch job, the images become very small and will still show as low DPI when adjusted to their normal sizes in Word.

Thanks!

Link to comment
Share on other sites

29 minutes ago, carl123 said:

You use the Library panel to import it

If a file ends in .afmacro you use the Macro panel to import it

If the file ends in .afmacros you use the Library panel

BTW, how did you record the macro? What settings did you use?

Link to comment
Share on other sites

9 minutes ago, GTech said:

BTW, how did you record the macro? What settings did you use?

He probably used Document > Resize Document, unchecked the Resample box, then specified 300 as the DPI.

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

32 minutes ago, GTech said:

OK, I was able to import the macro and it works when combined with specifying the width (but not the height) in the batch job. If you don't set the width in the batch job, the images become very small and will still show as low DPI when adjusted to their normal sizes in Word.

Thanks!

Not sure I understand what you are doing.

The macro is designed to just change the DPI of the image to 300dpi.  It does not alter the width or height of the original images, which will remain at whatever width and height they were before.  You should not need to enter any values for width or height in the File > New Batch Job screen

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

12 minutes ago, carl123 said:

Not sure I understand what you are doing.

The macro is designed to just change the DPI of the image to 300dpi.  It does not alter the width or height of the original images, which will remain at whatever width and height they were before.  You should not need to enter any values for width or height in the File > New Batch Job screen

I think that @GTech meant is this:

  1. They have an image that is, say 288px by 432px and is 72 DPI. If you print that, it is 4 inches by 6 inches.
  2. They convert it to 300 DPI. The printed image is now .96 inches by 1.44 inches.

I'm not sure what size they're specifying for the width when they run the batch job, but my guess is that they're specifying a width of 1200 px (letting Photo calculate 1800px for the other dimension), which then gives them back a 4x6 inch print.

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

10 minutes ago, carl123 said:

Not sure I understand what you are doing.

The macro is designed to just change the DPI of the image to 300dpi.  It does not alter the width or height of the original images, which will remain at whatever width and height they were before.  You should not need to enter any values for width or height in the File > New Batch Job screen

Yes, the sizes were not changed but if you set them to 300dpi without resampling themwhen you insert them in MS Word, they're reduced to a 3rd of their original size (to maintain the 300 dpi resolution). When you adjust them back to their original sizes, the resolution is reduced back to 96dpi. This is in MS Word. I don't know about other applications.

Link to comment
Share on other sites

5 minutes ago, walt.farrell said:

I think that @GTech meant is this:

  1. They have an image that is, say 288px by 432px and is 72 DPI. If you print that, it is 4 inches by 6 inches.
  2. They convert it to 300 DPI. The printed image is now .96 inches by 1.44 inches.

I'm not sure what size they're specifying for the width when they run the batch job, but my guess is that they're specifying a width of 1200 px (letting Photo calculate 1800px for the other dimension), which then gives them back a 4x6 inch print.

You're right. The images were reduced to about a 3rd of their original size to maintain the 300 dpi resolution. Adjusting the sizes up simply reduced the DPI back to 96. I set the width to 1500 px when I ran the batch job, so I presume the resampling was done at that point. If you don't want the images to be the same width then this could be an issue. As I was using these particular images in Word, it wasn't an issue but I can see it being an issue in other situations.

Link to comment
Share on other sites

If you want the images to be resized for use in Word(?) then set the width field to w*3

Don't use a fixed value for the width field as this will affect all images the same

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

 
 
 
 
7 minutes ago, carl123 said:

If you want the images to be resized for use in Word(?) then set the width field to w*3

Don't use a fixed value for the width field as this will affect all images the same

That works and definitely the best way of doing it. 

Without this function, I probably would've had to go back to PS, so big thanks.

Link to comment
Share on other sites

On 12/26/2019 at 2:49 AM, carl123 said:

Try the attached macro

 

Change DPI to 300.afmacros

I find myself puzzled exactly what you did, Carl.

My guess was that for your macro you used Document > Resize Document, unchecked Resample, changed the DPI, and clicked Resize.

Your macro works on images of different sizes, changing the DPI but leaving the pixel dimensions unchanged.

But when I do that (and it's confirmed in another topic as a bug) and run it against an image with a different size, the image becomes distorted.

So, is my guess incorrect? If so, what did your macro do? If not, why does yours work but my macro fails? Both macros are 1 step, which is shown as changing the document properties.

Thanks.

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

I suspect that's a 1.6 macro, I can't seem to record the same effect in 1.7, will try 1.8 when I have some more time

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

6 hours ago, carl123 said:

I suspect that's a 1.6 macro, I can't seem to record the same effect in 1.7, will try 1.8 when I have some more time

Thanks, Carl. I can't get it to work in either 1.7 or 1.8. I hadn't considered it might be an older macro.

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

  • 2 weeks later...

@carl123, I have just been trying your macro (in 1.7). As applied to a single image, it works as described. When used in a batch job, it has no effect. The output files have the same dpi as the input.

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

Just downloaded it again (from this thread) and it seems to work Ok for me.

Are you setting any other parameters in the batch job screen I can test with?

Or if not, uploading a sample file that it fails on might reveal something

 

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

  • 3 months later...

I had this problem too, but Carl's macro (although from a windows version I think) works fine for me on Affinity Photo v1.83 and Mac OS 10.15

I have about 50 images per month to batch process from various file formats, colour formats and dpi to CMYK 300dpi jpg at original physical size, so this will make a huge difference to my use of Affinity Photo. Perhaps I can finally ditch that other app...

Many thanks Carl, much appreciated!

 

 

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.