From 2eaeb5c58313fdd469e369f91fd33147813d2ce8 Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Mon, 10 Oct 2022 13:14:22 -0600 Subject: [PATCH] utility.presence: fix small image --- src/modules/utility.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/utility.js b/src/modules/utility.js index 508b8bc..17924c2 100644 --- a/src/modules/utility.js +++ b/src/modules/utility.js @@ -816,11 +816,13 @@ presence.callback = async function (msg, line) { const smallImage = await fetch(smallUrl) .then((res) => res.arrayBuffer()) .then((b) => Buffer.from(b)); - const smallImageSharp = sharp(smallImage).resize(20, 20); + const smallImageBuffer = sharp(smallImage) + .resize(20, 20) + .toBuffer(); presenceImage.composite([ { - input: smallImageSharp, + input: smallImageBuffer, gravity: "southeast", }, ]);