This commit is contained in:
Dragon Fire
2020-07-01 15:02:57 -04:00
parent 85ad89bfe0
commit 2208287333
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ module.exports = class PixelizeCommand extends Command {
const data = await loadImage(body);
const canvas = createCanvas(data.width, data.height);
const ctx = canvas.getContext('2d');
pixelize(ctx, 0.15, 0, 0, canvas.width, canvas.height);
pixelize(ctx, canvas, data, 0.15, 0, 0, canvas.width, canvas.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: 'pixelize.png' }] });