Create standardized canvas on which images can be pasted


I am trying to figure out how to resize images of various ratios, widths, and heights so that they are centered on a black canvas that is 1920 pixels wide by 1080 pixels high. I have used Retrobatch for various automations, but I have not yet figured out how to create this workflow. Any help would be appreciated!



Hello, and welcome!

This is something that can be done with Retrobatch Pro, the Adjust Margins node, and JavaScript expressions (which are only available in Pro).

The JavaScript is needed to do some simple math to determine how much border you need to add to the images. It looks like this:

And then you’ll get an image that’s 1920x1080 ever time, with black taking up the space that the image didn’t have pixels already. I’ve also attached a sample workflow. Let me know how it works out!

1920x1080_margins.retrobatch (4.0 KB)

Dear August (or “Gus” as they call you on the MacPowerUsers Podcast),

Thank you so much for the quick response. Yes, I am a paid user of Retrobatch Pro and enjoy it greatly. Your solution worked like a charm.

I work in Markdown (via BBEdit) and use Pandoc to output to various end products: PDFs, HTML, InDesign, etc. The whole point of using Markdown is to speed up the process and reduce friction. To this end, I use Reveal.JS (an open source HTML presentation framework []) for creating “quick and dirty” slide shows.

However, inserting images in such slideshows require that they be resized/reformatted to something approaching 1920x1080 so that they display properly in the presentation. You just solved a lingering frustration and made my life easier. Now, I can run the images through the “macro” you that created, be confident that they will display properly in my Reveal.JS presentations.


Mark Mayberry

1 Like