carl123 Posted February 27, 2018 Posted February 27, 2018 Attached is a Crop to Opaque macro which should work where you have irregular transparency at the top and bottom of an image, like the sample image shown below. It works in 2 parts, first cropping the transparency at the top of the image then cropping the transparency at the bottom of the image. Note: If you only have transparency at the top of the image you would need to modify the macro to stop the second part being run or weird things happen. (If anyone has found a way to force a running macro to pause at a specific point, that could be useful here) The macro was written purely as a proof of concept macro whilst stuck on a train, I have no real need for such a macro but it's here for others to dissect and use or modify/improve as required. Only tested on images up to 5000px X 3000px so far Tested only on one layer pixel images where the layer is named Background (the default) Seem to work in most real life scenarios but will fail if you push it beyond its capabilities. crop to opaque - version 1.afmacro 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 MEB Posted February 27, 2018 Staff Posted February 27, 2018 Thanks for sharing carl123! I've moved this thread to the Resources section where i believe you intended to post it. Let me know if not. Quote A Guide to Learning Affinity Software
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.