From 57a3bbdbc1fd68a442ef0edde3a6cd28f54bb60d Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 7 Mar 2021 20:27:03 -0500 Subject: [PATCH] Fix stray pixel --- commands/edit-meme/dislike.js | 2 +- commands/edit-meme/like.js | 2 +- commands/edit-meme/sexy-singles.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/edit-meme/dislike.js b/commands/edit-meme/dislike.js index efe1d302..211af5ac 100644 --- a/commands/edit-meme/dislike.js +++ b/commands/edit-meme/dislike.js @@ -45,7 +45,7 @@ module.exports = class DislikeCommand extends Command { const canvas = createCanvas(plate.width, plate.height + height); const ctx = canvas.getContext('2d'); ctx.drawImage(base, 0, 0, plate.width, height); - ctx.drawImage(plate, 0, height + 1); + ctx.drawImage(plate, 0, height); const attachment = canvas.toBuffer(); if (Buffer.byteLength(attachment) > 8e+6) return msg.reply('Resulting image was above 8 MB.'); return msg.say({ files: [{ attachment, name: 'dislike.png' }] }); diff --git a/commands/edit-meme/like.js b/commands/edit-meme/like.js index f2eeb2ed..740224d2 100644 --- a/commands/edit-meme/like.js +++ b/commands/edit-meme/like.js @@ -45,7 +45,7 @@ module.exports = class LikeCommand extends Command { const canvas = createCanvas(plate.width, plate.height + height); const ctx = canvas.getContext('2d'); ctx.drawImage(base, 0, 0, plate.width, height); - ctx.drawImage(plate, 0, height + 1); + ctx.drawImage(plate, 0, height); const attachment = canvas.toBuffer(); if (Buffer.byteLength(attachment) > 8e+6) return msg.reply('Resulting image was above 8 MB.'); return msg.say({ files: [{ attachment, name: 'like.png' }] }); diff --git a/commands/edit-meme/sexy-singles.js b/commands/edit-meme/sexy-singles.js index 2752e3ce..1b812a30 100644 --- a/commands/edit-meme/sexy-singles.js +++ b/commands/edit-meme/sexy-singles.js @@ -41,7 +41,7 @@ module.exports = class SexySinglesCommand extends Command { const width = Math.round(base.width * scaleW); const canvas = createCanvas(plate.width + width, plate.height); const ctx = canvas.getContext('2d'); - ctx.drawImage(base, plate.width + 1, 0, width, plate.height); + ctx.drawImage(base, plate.width, 0, width, plate.height); ctx.drawImage(plate, 0, 0); const attachment = canvas.toBuffer(); if (Buffer.byteLength(attachment) > 8e+6) return msg.reply('Resulting image was above 8 MB.');