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:
parent
dc9b7e5f3d
commit
04d2308bbc
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue