ShenaJ Posted April 22 Posted April 22 I have several images that have blank pixels all around them. They are currently 12500x12500px. I need to trim off as many of the blank pixels as possible and end up with a 4000x4000px image. Of course I know there will be extra pixels either in width or height, but I definitely need the result to be a square image. I'm hoping to make this a batch job, but can't quite get the steps right. I've tried clipping the canvas and tranforming the image, but it goes by a percentage, so when I do that, the image I've used as a reference works, but not others. Is there a way to set this up? I'm attaching an image as an example. It's smaller than the images I'm using, but basically I just need the batch job to be able to trim off extra, while still leaving it a square and then saving it as 4000x4000px. Any help is appreciated! Quote
carl123 Posted April 22 Posted April 22 Are all the images portrait? (i.e. Taller than they are wide) I know the canvas is a square, I'm just referring to the image on the canvas 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.
carl123 Posted April 22 Posted April 22 (edited) Macro is attached. You install it via the Library panel Works on the PNG image you uploaded but without more of your images, unable to test thoroughly It can run as a Macro solo or via the Batch job panel (if in batch job just run the macro, no need to specify any output size for the PNG file Off to lunch now but if it fails on an image please upload that image so I can see why and how to rectify it EDIT: This macro will work in 2.5.7 but not 2.6.2 See further down this thread for new 2.6.2 version Firebug4.afmacros Edited April 22 by carl123 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.
ShenaJ Posted April 22 Author Posted April 22 Thank you for taking the time to work on that. Here's one of the images it failed on. Ideally, there would not be so much blank area around the edges and it would fill most of the 4000x4000 size. I truly apprecaite your time! Quote
carl123 Posted April 22 Posted April 22 This is what I get when I run the macro on the above image It all looks OK to me Are you seeing something different after running the macro? 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.
ShenaJ Posted April 22 Author Posted April 22 So strange! The image I uploaded was the result I got after running it. I wonder what I'm doing wrong? I'll try again on my end. Quote
ShenaJ Posted April 22 Author Posted April 22 I tried it again, and it's closer, but still not at the 4000px. Any ideas? Quote
carl123 Posted April 22 Posted April 22 Can you open that file again in APhoto Do nothing to it Just do a save as to a ".aphoto" file and upload that file to the forum 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.
carl123 Posted April 22 Posted April 22 OK, I know why you are seeing different results The APhoto 2.6.2 version you are using is running the macro differently as I wrote it using the 2.5.7 version I think that was reported as a bug I have redone it in 2.6.2 and tested on the 2 images in this thread New Macro file is attached (You can delete the old one) See how it works for you Firebug5.afmacros ShenaJ 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.
ShenaJ Posted April 22 Author Posted April 22 @carl123 you are amazing! Thank you so much for your help, you have no idea how grateful I am! Quote
carl123 Posted April 22 Posted April 22 No problem, if you run into any other issues just post back ShenaJ 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.
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.