Update node-webpmux 2.x syntax to 3.x (support upstream breaking change) (#762)

Co-authored-by: Apeiron <apeiron@none>
This commit is contained in:
ApeironTsuka
2021-07-15 21:50:54 -05:00
committed by GitHub
parent dc9b7e5f3d
commit 04d2308bbc

View File

@@ -183,9 +183,9 @@ class Util {
let jsonBuffer = Buffer.from(JSON.stringify(json), 'utf8');
let exif = Buffer.concat([exifAttr, jsonBuffer]);
exif.writeUIntLE(jsonBuffer.length, 14, 4);
await img.loadBuffer(Buffer.from(webpMedia.data, 'base64'));
await img.load(Buffer.from(webpMedia.data, 'base64'));
img.exif = exif;
webpMedia.data = (await img.saveBuffer()).toString('base64');
webpMedia.data = (await img.save(null)).toString('base64');
}
return webpMedia;