From 04d2308bbcaf635a89cbf6cef7593a83d58be0c2 Mon Sep 17 00:00:00 2001 From: ApeironTsuka Date: Thu, 15 Jul 2021 21:50:54 -0500 Subject: [PATCH] Update node-webpmux 2.x syntax to 3.x (support upstream breaking change) (#762) Co-authored-by: Apeiron --- src/util/Util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/Util.js b/src/util/Util.js index 89ae6c7..4bfc378 100644 --- a/src/util/Util.js +++ b/src/util/Util.js @@ -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;