From d35ef6d7b274d6c7d7b296962542429ea084f4db Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 6 Mar 2021 12:34:38 -0500 Subject: [PATCH] Fix --- commands/edit-image/eyes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/edit-image/eyes.js b/commands/edit-image/eyes.js index 57b6bbd8..5b4e7aa8 100644 --- a/commands/edit-image/eyes.js +++ b/commands/edit-image/eyes.js @@ -48,7 +48,7 @@ module.exports = class EyesCommand extends Command { for (const face of faces) { const landmarks = face.landmark; const leftWidth = landmarks.left_eye_right_corner.x - landmarks.left_eye_left_corner.x; - const leftRatio = eyes.width / leftWidth; + const leftRatio = base.width / leftWidth; const leftHeight = eyes.height * leftRatio; ctx.drawImage( eyes, @@ -58,7 +58,7 @@ module.exports = class EyesCommand extends Command { leftHeight ); const rightWidth = landmarks.right_eye_right_corner.x - landmarks.right_eye_left_corner.x; - const rightRatio = eyes.width / rightWidth; + const rightRatio = base.width / rightWidth; const rightHeight = eyes.height * rightRatio; ctx.drawImage( eyes,