feat: use buffers

This commit is contained in:
TrèsAbhi committed 2024-10-21 18:32:52 -05:00
1 parent c8bb1f190a
commit c98c19dc36
26 files changed
+134 -269

No files matched your search

@@ -27,22 +27,19 @@ export async function boosterIcons() {
.split('\n')[4]
.split(' ')
.map(Number);
const content = (
await image
.clone()
.extract({
left: sizes[0],
top: sizes[1],
width: sizes[2],
height: sizes[3],
})
.toBuffer()
).toString('base64');
const content = await image
.clone()
.extract({
left: sizes[0],
top: sizes[1],
width: sizes[2],
height: sizes[3],
})
.toBuffer();
changes.push({
path: `icons/boosters/${name}.webp`,
content,
encoding: 'base64',
});
}),
);