jacphoto Posted March 6, 2023 Posted March 6, 2023 In the dialog box of batch processing if I input an expression like w*2560/max(w, h) in the size definition fields no error occurs but the expression is ignored and the size of the photos not modified I use Affinity 2.0.4 on Windows 10 Professional 21H2 Quote
Staff Chris B Posted March 8, 2023 Staff Posted March 8, 2023 Hey jacphoto, If the expression is wrong nothing will happen other than you just end up with the same sized image. So for example an expression such as w*.5 will work. I cannot get your expression to work in any field that typically accept expressions.l Quote How to format a bug report | Learning Resources | List of V2 FAQs | YouTube Tutorials
David in Яuislip Posted March 8, 2023 Posted March 8, 2023 On 3/6/2023 at 5:56 PM, jacphoto said: w*2560/max(w, h) Although I understand your w*2560/max(w, h) sadly Photo doesn't However, you appear to want to resize images so that either the width or height becomes 2560 You can achieve this by putting 2560 in both width & height boxes and leaving the A ticked however this will upsize small images To prevent upsizing use min(2560,w) in the width box and min(2560,h) in the height box Checking the validity of an expression using eg the Document/Document Resize dialog is of limited use. If you type min(2560,w) into the width box it will fail yet it works in a batch job I don't consider this to be a bug it's just hard to work with 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
carl123 Posted March 8, 2023 Posted March 8, 2023 1 minute ago, David in Яuislip said: I don't consider this to be a bug it's just hard to work with I think it's a bug The batch job recognises w*2560 and max(w, h) when entered separately, so why not when joined, as in... w*2560/max(w, h) 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.
Staff Chris B Posted March 8, 2023 Staff Posted March 8, 2023 This is what I've been trying to work out. I can feed it back to dev and see what they think. Quote How to format a bug report | Learning Resources | List of V2 FAQs | YouTube Tutorials
jacphoto Posted March 8, 2023 Author Posted March 8, 2023 Hi Chris B, 4 hours ago, Chris B said: Hey jacphoto, If the expression is wrong nothing will happen other than you just end up with the same sized image. So for example an expression such as w*.5 will work. I cannot get your expression to work in any field that typically accept expressions.l I thought Affinity Photo used to detect errors using color feed back in the box where the formula is typed. Maybe only in previous versions. Anyhow it would be useful. Quote
carl123 Posted March 8, 2023 Posted March 8, 2023 The Equations filter highlights errors in red But even good equations were sometime labeled as bad (red) 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.
jacphoto Posted March 8, 2023 Author Posted March 8, 2023 No red highlighting for me in the dialog box of batch operation. I am using v 2.0.4 Quote
carl123 Posted March 8, 2023 Posted March 8, 2023 The Equations filter not the batch job Filter > Distort > Equations 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.
jacphoto Posted March 8, 2023 Author Posted March 8, 2023 1 hour ago, David in Яuislip said: However, you appear to want to resize images so that either the width or height becomes 2560 You can achieve this by putting 2560 in both width & height boxes and leaving the A ticked however this will upsize small images To prevent upsizing use min(2560,w) in the width box and min(2560,h) in the height box Yes I am trying to resize a mix of landscape ane portrait orientation photos and possibly smaller ones. Thanks for the tip to overcome the issue it worked for me. Although I am surprised of the behavior when typing values which are not proportional to the original sizes of the image while checking A 1 hour ago, David in Яuislip said: Checking the validity of an expression using eg the Document/Document Resize dialog is of limited use. I agree that such a formula is not useful if you consider to resize manually one image using Document Resize. But if you intend to build a Macro including the use of Document Resize it would be useful to be able to use the formula there and to have a different behavior so that the formula is not calculated at typing time but at execution time so that in a macro it can produce resizing based on the current size of an image in the lot processed by a batch. I was considering to do that to be able to modify the dpi resolution of a set of images with the batch function at the same time I rescale them to overcome the lack of a dpi size field in the parameters of the batch function 1 hour ago, David in Яuislip said: Quote
David in Яuislip Posted March 8, 2023 Posted March 8, 2023 1 hour ago, jacphoto said: Although I am surprised of the behavior when typing values which are not proportional to the original sizes of the image while checking A What you enter into the batch width & height boxes sets limits for the final size, the A maintains proportions I see you've noticed that Document Resize in a macro records the values calculated not the formula and this is unfortuneate. If that were possible then a macro could resize then apply sharpening, then it could be called from a batch job but that's not how it works After resizing most images will need sharpening, whilst you can record sharpening as a step in a macro, when you include that in a resizing batch job then the macro will run before the resizing so the sharpening will be wrong. You could run a batch job to resize images then run another batch to apply sharpening to them but I'd lose the will to live I've never managed batch changing dpi and gave up shortly after starting with Photo, I use exiftool eg exiftool -Xresolution=96 -Yresolution=96 *.jpg Batch jobs and macros used together can be very useful and run quickly but there are a lots of quirks 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
jacphoto Posted March 8, 2023 Author Posted March 8, 2023 2 hours ago, David in Яuislip said: What you enter into the batch width & height boxes sets limits for the final size, the A maintains proportions I see you've noticed that Document Resize in a macro records the values calculated not the formula and this is unfortuneate. If that were possible then a macro could resize then apply sharpening, then it could be called from a batch job but that's not how it works After resizing most images will need sharpening, whilst you can record sharpening as a step in a macro, when you include that in a resizing batch job then the macro will run before the resizing so the sharpening will be wrong. You could run a batch job to resize images then run another batch to apply sharpening to them but I'd lose the will to live I've never managed batch changing dpi and gave up shortly after starting with Photo, I use exiftool eg exiftool -Xresolution=96 -Yresolution=96 *.jpg Batch jobs and macros used together can be very useful and run quickly but there are a lots of quirks Thanks for this. I was previously doing that with an outdated version of Photoshop Elements which includes all the parameters in its batch process. Moving to Affinity Photo for this purpose does not seem then a good move. Hopefully there are a lot of powerful and interesting functions in Affinity. I have used exiftool through exiftool GUI which does not seem to include the capability to do this, I understand you do this on a file by file basis using exiftool command prompt. Lets hope Affinity Photo will provide more help for this in the near future. Quote
David in Яuislip Posted March 9, 2023 Posted March 9, 2023 16 hours ago, jacphoto said: I have used exiftool through exiftool GUI which does not seem to include the capability to do this, Click the ExifTool Direct button then you can run commands from there. In this case 29 files were modified in about a second 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
jacphoto Posted March 9, 2023 Author Posted March 9, 2023 4 hours ago, David in Яuislip said: Click the ExifTool Direct button then you can run commands from there. In this case 29 files were modified in about a second OK thanks, I know see that. I was just using a very outdated version 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.