jaybray Posted February 24, 2021 Share Posted February 24, 2021 I have a series of screenshots I need to crop. Each image has the same width (1984 px), but the height varies from screenshot to screenshot. I need to remove 687 px from the left and right sides (1374 px in total) resulting in an image that is 600 px wide. I don't need to remove anything from the top or bottom. Using the Crop Tool or Resize Canvas, I can achieve my desired results easily if I manually Crop/Resize each image individually. However, I'd prefer to set up a macro to do this more quickly. I cannot figure out how to build a macro that removes the needed amount from the left and right while ignoring the height differences with each image. Thanks in advance for any ideas. Quote Link to comment Share on other sites More sharing options...
v_kyr Posted February 24, 2021 Share Posted February 24, 2021 Not sure this can be done at all with the APh macro facility, since it usually doesn't work/records macros in a dynamic size independent manner. In your case as you have a constant fixed width adjusting the left/right side decrement accordingly wouldn't be maybe that much of the problem here (if cropping always does work initially from a center position then), but instead taking the different possible heights dynamically into account might be problematic. In contrast to APh you can also take a look at ImageMagick which offers quite more options here and can be easily used for batch processing too. Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2 Link to comment Share on other sites More sharing options...
jaybray Posted February 24, 2021 Author Share Posted February 24, 2021 Ok, thanks. I have access to Photoshop which offers the functionality I need on this. I just prefer using Affinity products whenever possible. Quote Link to comment Share on other sites More sharing options...
v_kyr Posted February 24, 2021 Share Posted February 24, 2021 In PS it should be easy to do, either via an ATN action or scripting, same with Gimp etc. Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2 Link to comment Share on other sites More sharing options...
carl123 Posted February 25, 2021 Share Posted February 25, 2021 See if the attached does what you want Install via library panel resize600-b.afmacros jaybray 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. Link to comment Share on other sites More sharing options...
jaybray Posted February 25, 2021 Author Share Posted February 25, 2021 Whoa @carl123 — this is slick. This appears to be working. I'll need to spend some time analyzing how you did this. I really appreciate your time and assistance. ⭐⭐⭐⭐⭐ for you. Quote Link to comment Share on other sites More sharing options...
John Rostron Posted February 26, 2021 Share Posted February 26, 2021 Yes, @carl123, I would really love to know how you did that. John Quote 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 More sharing options...
carl123 Posted February 26, 2021 Share Posted February 26, 2021 I thought this was an easy one ☺️ The final size of the image is always 600px width So, I just created a rectangle 600px width by 3000px height (3000px just to cater for the largest anticipated image) Then just arrange the rectangle to the middle of the documentArrange > Align Centre Arrange > Align Middle Clip the image with the Rectangle to get a 600px width image (variable height depending on the original image) Then just tidy up with... Clip canvas / rasterise & trim John Rostron 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. Link to comment Share on other sites More sharing options...
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.