From 7cb4361b4994504ade454ad95830809f4cc9c89b Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 6 Mar 2021 12:49:50 -0500 Subject: [PATCH] Make eyes bigger --- commands/edit-image/eyes.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/commands/edit-image/eyes.js b/commands/edit-image/eyes.js index 8f2d8c57..846c94e2 100644 --- a/commands/edit-image/eyes.js +++ b/commands/edit-image/eyes.js @@ -52,20 +52,20 @@ module.exports = class EyesCommand extends Command { const leftHeight = eyes.height * leftRatio; ctx.drawImage( eyes, - landmarks.left_eye_left_corner.x, - landmarks.left_eye_left_corner.y - (leftHeight / 2), - leftWidth, - leftHeight + landmarks.left_eye_left_corner.x - leftWidth, + landmarks.left_eye_left_corner.y - (leftHeight / 2) - leftHeight, + leftWidth * 2, + leftHeight * 2 ); const rightWidth = landmarks.right_eye_right_corner.x - landmarks.right_eye_left_corner.x; const rightRatio = rightWidth / eyes.width; const rightHeight = eyes.height * rightRatio; ctx.drawImage( eyes, - landmarks.right_eye_left_corner.x, - landmarks.right_eye_left_corner.y - (rightHeight / 2), - rightWidth, - rightHeight + landmarks.right_eye_left_corner.x - rightWidth, + landmarks.right_eye_left_corner.y - (rightHeight / 2) - rightHeight, + rightWidth * 2, + rightHeight * 2 ); } return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'eyes.png' }] });