Fix blurry emoji

This commit is contained in:
Dragon Fire
2021-04-06 10:22:17 -04:00
parent f414caa98d
commit 97a00d5e70
+4
View File
@@ -52,6 +52,10 @@ module.exports = class EmojiFaceCommand extends Command {
}
const emojiData = await request.get(emojiURL);
const emojiImg = await loadImage(emojiData.body);
if (emojiURL.endsWith('svg')) {
emojiImg.width *= 4;
emojiImg.height *= 4;
}
const imgData = await request.get(image);
try {
const faces = await this.detect(imgData);