From fe183032ac9730bc17dbbff78c4f1a7ebc672c52 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 13 Jun 2020 19:29:12 -0400 Subject: [PATCH] Lower jpeg quality in deep fry --- commands/edit-meme/deep-fry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/edit-meme/deep-fry.js b/commands/edit-meme/deep-fry.js index 90675217..033ea493 100644 --- a/commands/edit-meme/deep-fry.js +++ b/commands/edit-meme/deep-fry.js @@ -35,7 +35,7 @@ module.exports = class DeepFryCommand extends Command { ctx.drawImage(data, 0, 0); desaturate(ctx, -20, 0, 0, data.width, data.height); contrast(ctx, 0, 0, data.width, data.height); - const attachment = canvas.toBuffer('image/jpeg', { quality: 0.5 }); + const attachment = canvas.toBuffer('image/jpeg', { quality: 0.3 }); if (Buffer.byteLength(attachment) > 8e+6) return msg.reply('Resulting image was above 8 MB.'); return msg.say({ files: [{ attachment, name: 'deep-fry.jpeg' }] }); } catch (err) {