feat(aklive2d): added a logic to handle images that does not require alpha composite

This commit is contained in:
Haoyu Xu
2023-08-12 12:56:54 +08:00
parent 5979c77c26
commit 88aa63c69e
2 changed files with 19 additions and 4 deletions

View File

@@ -28,4 +28,8 @@ export default class AlphaComposite {
return await sharp(newImage).rotate(rotate).toBuffer()
}
async toBuffer(filename, extractedDir) {
return await sharp(path.join(extractedDir, filename)).toBuffer()
}
}