GTech Posted December 25, 2019 Posted December 25, 2019 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. Quote
carl123 Posted December 26, 2019 Posted December 26, 2019 Try the attached macro Change DPI to 300.afmacros Arini R 1 Quote 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.
GTech Posted December 27, 2019 Author Posted December 27, 2019 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. Quote
carl123 Posted December 27, 2019 Posted December 27, 2019 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 Quote 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.
GTech Posted December 27, 2019 Author Posted December 27, 2019 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! Quote
GTech Posted December 27, 2019 Author Posted December 27, 2019 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? Quote
walt.farrell Posted December 27, 2019 Posted December 27, 2019 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. Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad: iPad Pro M1, 12.9": iPadOS 18.3, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1
carl123 Posted December 27, 2019 Posted December 27, 2019 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 Quote 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.
walt.farrell Posted December 27, 2019 Posted December 27, 2019 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: 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. 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. Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad: iPad Pro M1, 12.9": iPadOS 18.3, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1
GTech Posted December 27, 2019 Author Posted December 27, 2019 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 them, when 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. Quote
GTech Posted December 27, 2019 Author Posted December 27, 2019 5 minutes ago, walt.farrell said: I think that @GTech meant is this: 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. 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. Quote
carl123 Posted December 27, 2019 Posted December 27, 2019 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 walt.farrell and thomaso 2 Quote 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.
GTech Posted December 27, 2019 Author Posted December 27, 2019 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. Quote
walt.farrell Posted January 2, 2020 Posted January 2, 2020 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. Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad: iPad Pro M1, 12.9": iPadOS 18.3, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1
carl123 Posted January 3, 2020 Posted January 3, 2020 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 Quote 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.
walt.farrell Posted January 3, 2020 Posted January 3, 2020 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. Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad: iPad Pro M1, 12.9": iPadOS 18.3, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1
John Rostron Posted January 12, 2020 Posted January 12, 2020 @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 Quote Windows 11, Affinity Photo 2.4.2 Designer 2.4.2 and Publisher 2.4.2 (mainly Photo). CPU: Intel Core i5 8500 @ 3.00GHz. RAM: 32.0GB DDR4 @ 1063MHz, Graphics: 2047MB NVIDIA GeForce GTX 1050
carl123 Posted January 12, 2020 Posted January 12, 2020 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 Flapper and John Rostron 2 Quote 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.
Flapper Posted May 9, 2020 Posted May 9, 2020 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! Quote
Recommended Posts
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.