How to merge several images with the CLI?

Hello,

I am writing a script that calls the Aseprite CLI to generate 3 sprite sheets, using the following commands:

%ase% -b source.aseprite --sheet tmp.png
%ase% -b tmp.png --palette pal1.png --color-mode rgb --palette pal_final.png --color-mode indexed --save-as tmp1.png
%ase% -b tmp.png --palette pal2.png --color-mode rgb --palette pal_final.png --color-mode indexed --save-as tmp2.png
%ase% -b tmp.png --palette pal3.png --color-mode rgb --palette pal_final.png --color-mode indexed --save-as tmp3.png

The goal of those calls is to generate color variations of the sprite sheet, while still using the same final palette. Once I call my script, the tmp1, tmp2 and tmp3 images get generated. Let’s say their size is 100x100.

Now I’d like to merge all 3 images into one, vertically, with tmp1 at the top, tmp2 in the middle, and tmp3 at the bottom, forming a 100x300 image (like a meta sprite sheet created from these sprite sheets).

Reading the CLI documentation, I don’t think it’s possible with the CLI, but I thought I’d ask just in case. If not possible, I guess I’ll just have to write my own merging logic without relying on the CLI.

Thank you!

It turn out the solution was very simple, but somehow I could not think of it back then.

%ase% -b source.aseprite --sheet tmp.png
%ase% -b tmp.png --palette pal1.png --color-mode rgb --palette pal-final.png --color-mode indexed --save-as tmp1.png
%ase% -b tmp.png --palette pal2.png --color-mode rgb --palette pal-final.png --color-mode indexed --save-as tmp2.png
%ase% -b tmp.png --palette pal3.png --color-mode rgb --palette pal-final.png --color-mode indexed --save-as tmp3.png

%ase% -b --sheet-type vertical ^
tmp1.png ^
tmp2.png ^
tmp3.png ^
--sheet final-image.png

del tmp.png
del tmp1.png
del tmp2.png
del tmp3.png