Various features I'm missing in Retrobatch (Scale to fit area, resize canvas, compression)

Hello! I’m finally facing the death of my beloved, creaky, 32-bit Fireworks and attempting to migrate to Acorn and Retrobatch. After seeing the PNG export incorporate the limited palette (~256 colour) options, I think I’m ready! It’s pretty great, and I’m inspired to try to use it to do more things than a combo of Photoshop and Fireworks and Imagemagick ever let me do.

But there are a few “missing” Retrobatch options I’ve noticed that are necessary for me to replace all the old tools I’m dependent on. I wanted to signal that I would make use of them and I think they’d be a good fit. Here’s my wishlist:

  • “Scale to Fit Area”: Specify a canvas width and height in pixels, and proportionally scale to fit within that canvas
  • “Resize Canvas”: Ideally it’d work just like Acorn’s feature of the same name, with support for relative values (e.g. +40px width, +10% height)
  • Set borders separately for “Add Border”: I’d like to set different border sizes at the top, right, bottom and left separately, like how CSS works.
  • Dynamic values for “Image Grid”: I’m looking to combine images in a vertical stack using Image Grid, and it works nicely with “Count Across” set to 1 and “Count Down” set to the number of images I’m feeding it… but couldn’t this be automatic? Either by a Retrobatch-wide system that allows me to put a “Input File Count” variable there, or an “auto” setting in the Image Grid node?
  • Better crushing: I notice that running through ImageOptim.app with default settings still shaves off 4-10% of PNG file size, even with the “Brute force crush” option selected. Same goes for JPEGs, which I guess don’t have any “JPEGOptim” style compressor. I see I can just use “Open In App” to run my output through ImageOptim after every “Write Images” node, but would there be a way to either make an ImageOptim node, or, better yet, integrate whatever ImageOptim is doing into “Write Images”?
  • Guetzli support: Guetzli was a bit of a revelation to me when it came out a few years ago. It’s super neato and really can compress JPEGs of a medium-to-high quality better than anything else, but there isn’t a Mac GUI tool for it out there. I continue to use it on batches of images for my comic, with a custom-made shell script. I think it could be a feature of “Write Images”, but accomodating its slow multi-minute render time could be difficult in the current UI.

I hope this is an OK format to post a big wishlist in! But I’m really excited to see how much Retrobatch can already handle and want to report on any of the roadblocks I run into.

Thanks for the ideas!

And I’ll see what I can do about getting better crushing as well. Retrobatch actually has a license for most of the same code that ImageOptim uses, so in theory it should be able to match what’s done there.

1 Like

hello.
news on the “resize canvas” option?
i have to change the canvas to a folder full of images, and don’t wanna do it by hand.

greetings,
sven

The latest build of Retrobatch ( Latest Builds from Flying Meat ) has an add margins node, which will either add space on edges of your image, or if you give it negative values, it’ll crop it.

Does that work for you case?

@ccgus I try it but it dosen’t work.
I have to make all the images square without croping part of the image.
Maybe you have another idea?

Greetings,
Sven

@sven Just to be clear, you’re wanting to make the image larger? So if you have a 100x200px image, you’re wanting it to end up being 200x200px?

@ccgus that’s right. I scale the images down to 900px largest side and then I want to add space to have a square 900x900px.
In acorn or photoshop I simply change the canvas size of the image.

Thanks,
Sven

@sven Gotcha. I’ll see what I can do to make this happen sometime soon. (If you know javascript, you could probably get it done with a quick plugin).

@sven Can you try out the new “Make Square” node from Latest Builds from Flying Meat and let me know how it works for you?

@ccgus AWSOME!!!

Thank you very much.

Greetings,
Sven

Hi, Make Square is exactly what I’m looking for, but I can only get version 1.3.1. How can I get 1.3.2, please?

Ah, I’ve found the download and tried it out. Would it be possible to add something like max dimensions to Make Square or Adjust Margins? I can get images of various sizes and I want to make them a fixed square size. If both dimensions are smaller than the max dimension, I’d want it to add a margin to that size. As it stands, I have to do the maths for the margin size and coordinates myself. This is fine if they are all the same size, but if they aren’t, it’s never going to work. I’d like something just like Resize Canvas but in bulk.

I don’t think that’s something to add directly to the Make Square node. Possible the margins however- I’ve been pondering adding an expression type to that field, so that you could say add an image width of return (image.size.width<600) ? 600-image.size.width : 0; and it would do the math on the fly. Would that solve your problem? (600 would be the max width in this example)

Hi, sorry for the delay; Yes, but I would need it to do both width and/or height. So, if I want 200x200, it could add both margins. I basically want to replicate Acorn’s “resize canvas” given exact dimensions.

I’d be interested to know what it would do if one or both of the image’s dimensions were larger than the specified max dimension(s).

1 Like

Actually, I’ve been playing with Make Square, and in the right order, it does exactly what I need. Thanks

Glad to hear it. For the latest build of Retrobatch, I’ve added JS Expressions (for RB Pro only) to the various length / size fields, which includes the Adjust Margins node. So let’s say you wanted to square up your image to 400px, you would do this:

This is a first stab at least- and if you try it out or have feedback, let me know!

1 Like

I’d like to further the request for “Scale to Fit Area” (called “Fit Image” in Photoshop) and “Resize Canvas”. Here’s my use case.

I need to prep a variety of different sized images to fit in a slideshow for a web page. I’d like to first fit the image (without distortion) within 950px by 500px. If the image is not 500px high, I’d like to pad the top with white to make it 500px tall.

I couldn’t do this with Retrobatch. (I was surprised that the scale squashed or squeezed the images.) I had to go to Photoshop and run Batch with an action.

Hello @Pipsqueak, and welcome!

I think what you might be after is the Adjust Margins node, using a JavaScript expression (which is available in Pro). Something like this should do the trick:

But what you’re after should be something built in, and I’ll see what I can do in a future release.

-gus

2 Likes

Hello,
I was wondering if there’s any news on this possibility. I just installed the app and notice that ImageOptim can compress the output around 10% still.
This is after loading PNGs, using Indexed PNG, and saving them.

I can easily output them to ImageOptim, but this is problematic if I then want to combine the optimised images into an animated PNG since I’d need 2 processes (or maybe use a script instead of Open App?).

Also, an option to choose animation rate rather than the limited number of defaults would be handy :slight_smile:

Hello @Graz, welcome!

I don’t have anything to announce at this time, sorry. I am working on updates though, so … eventually I’ll have more to say?

1 Like