Jump to content

Recommended Posts

Posted

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!

49 5.11.52 AM.png

Posted

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

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.

Posted (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 by carl123

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.

Posted

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!

8.png

Posted

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?

 

 

screenshot5.png

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.

Posted

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. 

Posted

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

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.

Posted

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

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.

Posted

No problem, if you run into any other issues just post back

 

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.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.