Allow gaps in sheets

This commit is contained in:
Christopher Monsanto 2020-05-09 07:36:28 -04:00
parent e5040be858
commit ea2b48e77f

View File

@ -13,6 +13,15 @@ if (!sheetjs || !dest) {
(async() => {
const {default: sheet} = await import(path.join(process.cwd(), sheetjs));
for (let i = 0; i < sheet.entries.length; i++) {
if (sheet.entries[i] === undefined)
throw new Error(`gap: ${i}`);
if (sheet.entries[i] === null) {
// ImageMagick blank entry
sheet.entries[i] = "xc:transparent";
}
}
cp.execFileSync("montage", [
...sheet.entries,
"-background", "transparent",