CLI exporting with scale and interpolation method

image

Question: I have an .ase file with two layers.
I’m trying to export them to images of different scales, but by default the --scale command uses the ‘nearest neighbor’ interpolation method. I’d like to use ‘bilinear’ method instead. Is there a way to set this in the CLI?

Here is the command I use.

@ECHO OFF
pushd "%~dp0"

set ASEPRITE="C:\Program Files (x86)\Steam\steamapps\common\Aseprite\aseprite.exe"

%ASEPRITE% -b "ActionUI-Faces1.ase" --scale 0.5 --save-as ..\imgs\{layer}-x0.5.png
%ASEPRITE% -b "ActionUI-Faces1.ase" --scale 0.25 --save-as ..\imgs\{layer}-x0.25.png

Also, is there a way to enforce ‘bicubic’ interpolation method?

In case either of these two requests are impossible to carry out at the moment, I’ll be using a third party program to batch resize the exported images, so no worries there.

The CLI guide doesn’t mention a parameter to define the scaling algorithm so it might not be possible.

Alternatively you could write a simple script that created a temporary copy of the sprite, resized it via app.command.SpriteSize with some predefined scale and your desired method. You can call this script on your batch with --script as a parameter (e.g.,--script pathToScript\scriptName.lua).

If you want to define the scale on your batch command instead of hardcoding it on your script, you could also use –script-params, just remember to add it before the --script parameter or they will be ignored.

Thanks for the detailed answer! Sadly I’m no coder and can’t really write scripts, haha. I’ll find another way then.