From 48f6ffb07ad7e96120e6722cfa5a149c1837ad4b Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Mon, 4 May 2020 14:42:46 -0400 Subject: [PATCH] Fix --- commands/edit-meme/skyrim-skill.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/edit-meme/skyrim-skill.js b/commands/edit-meme/skyrim-skill.js index f91a6eb3..c4594810 100644 --- a/commands/edit-meme/skyrim-skill.js +++ b/commands/edit-meme/skyrim-skill.js @@ -54,8 +54,8 @@ module.exports = class SkyrimSkillCommand extends Command { const { body } = await request.get(image); const base = await loadImage(body); const plate = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'skyrim-skill.png')); - const scaleH = plate.width / base.height; - const height = Math.round(base.height / scaleH); + const scaleH = plate.width / base.width; + const height = Math.round(base.height * scaleH); const canvas = createCanvas(plate.width, plate.height + height); const ctx = canvas.getContext('2d'); ctx.drawImage(base, 0, 0, plate.width, height);