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,