Dangerous Posted March 26, 2023 Posted March 26, 2023 In a batch job I can resize an image proportionally by entering either the height or the width and the other dimension will calculate correctly ie a 1000 x 600px image will resize to 500 x 300 if I only enter the width as 500. If one of the images is 600 x 1000px it will resize correctly to 500 x 833.3. It doesn't matter what the actual dimensions for each image the height will adjust proportionally. If I use DOCUMENT RESIZE or CANVAS RESIZE and enter the width as 500px it will resize correctly as above. That is exactly what I would expect. The problem lies when RESIZE is used in a macro. When creating the macro enter 500 for the width and the height will be calculated to 300 correctly and when ran on any 1000 x 600 image is will resize correctly. Run the macro on a 600 x 1000 image or a 1600 x 1600 image then the issue rears its ugly head, the image is resized to 500 x 300 as the macro remember the 'fixed' size and the image is resized out of proportion (squashed or stretched). This is not good especially when you want to add a fixed amount additional canvas around a number of images which are a mix of landscape & portrait format, have been cropped by varying amounts (or stitched) or from cameras with different pixel dimensions etc. It hasn't been a real problem as up to now I have only needed to do a handful of images at a time but today I wanted to apply various adjustments to 700+ images and although I can write a macro to do what I want to image 1 it can not be applied to the rest via a batch file. The adjustments would have to be applied via 2 batch files and even then I can't figure out how to add the fixed amount of canvas around the images other than doing them manually to all 700+ files. I had assumed that the macro would have entered the assigned number (500) in to the width and calculated the height rather than set the width & height to 500 x 300 (fixed size when macro created), I was wrong Quote
PaulEC Posted March 26, 2023 Posted March 26, 2023 I don't think it's actually a bug, just an annoying limitation to the way macros work in APhoto! Dangerous 1 Quote Acer XC-895 : Windows 11 Home : Core i5-10400 Hexa-core 2.90 GHz : 32GB RAM : Intel UHD Graphics 630 – Affinity Publisher 2 : Affinity Photo 2 : Affinity Designer 2 : (latest release versions) – Also all apps on 12.9" (Second Generation) iPad Pro, OS Version 17.7.5 Old Lenovo laptop : Windows 10 - v1 and latest beta versions of all Affinity apps – Ancient Toshiba laptop: Vista - PagePlus X9, DrawPlus X8, PhotoPlus X8 etc
David in Яuislip Posted March 26, 2023 Posted March 26, 2023 I think you need two batch runs, one to resize to intermediate dimensions then another to apply a resize canvas macro This macro will increase the canvas width and height by 50px If you open it in the macro panel you can change the value (always use an even number or you'll get caught by pixel misalignment resulting in semi-transparent pixels on a couple of edges) then save it to the library with a new name Note that the macro increases the canvas size by copying the original, rotating 45° about the centre, unclipping canvas. The required increase must be within the resized canvas or it will clip For an 800x600 image the macro will first increase the canvas to 989x989 so it'll work for increases up to 188 Larger images may have larger amounts of resize. CanvasPlu50.afmacro Quote Microsoft Windows 11 Home, Intel i7-1360P 2.20 GHz, 32 GB RAM, 1TB SSD, Intel Iris Xe Affinity Photo - 24/05/20, Affinity Publisher - 06/12/20, KTM Superduke - 27/09/10
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.