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

@@ -37,16 +37,15 @@ export async function gameModeBanners() {
path = `/Gfx/UI/Hangar/GameTypes/battle-type_${name.toLowerCase()}`;
}
const content = (
await sharp(await readDVPLFile(`${DATA}${path}.packed.webp.dvpl`))
.trim({ background: { r: 0, g: 0, b: 0, alpha: 0 } })
.toBuffer()
).toString('base64');
const content = await sharp(
await readDVPLFile(`${DATA}${path}.packed.webp.dvpl`),
)
.trim({ background: { r: 0, g: 0, b: 0, alpha: 0 } })
.toBuffer();
changes.push({
path: `icons/game_mode_banners/${id}.webp`,
content,
encoding: 'base64',
});
}