How do I automatically level the horizon and crop the resulting border?

It seems I’m having a hard time finding out how to use the Auto Level and Trim to Edges nodes correctly. My workflow looks like this and it outputs images that have been straightened and thus slightly rotated, but this has created a transparent area.

I assume that the Trim to Edges node is designed to crop the image again, but despite trying all three settings of Trim to Edges, I always end up with pictures that are clearly not cropped to content.

Can you give me an idea of what I might be missing?

You should try the Adjust Margins node, with negative values. However, you’ll run into a problem that it’ll need to be different for every image (most likely anyway).

The reason the Tim To Edges node won’t work for this case is because it’ll only trim to the outmost edges of the transparent areas, where what you’re after is the innermost areas of transparency.

What I really should do is add an option to the Auto Level node which crops out the transparent areas. (Or add an option to Trim To Edges to trim out to the innermost transparent areas).

So, I would play with the Adjust Margins node and see if that can work for you until I add the other options I’ve mentioned.

I’ve just put up a new version of Retrobatch with a new option in the Trim To Edges node named “Trim All Transparent Edges”. This should do what you’re after. When you get a minute, could you download the latest version and test it out?

You can grab it from the following URL: Latest Builds from Flying Meat

-gus

This look is great! The first impression is that it works reliably. Thanks for your prompt support!