From edc733abd94592bed25124321a43701be7809375 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 15 Aug 2024 20:54:02 +1000 Subject: [PATCH] fix(ui): do not smooth pixel data when using eyeDropper --- .../frontend/web/src/features/controlLayers/konva/events.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/invokeai/frontend/web/src/features/controlLayers/konva/events.ts b/invokeai/frontend/web/src/features/controlLayers/konva/events.ts index 96f5ece261..8058f2ba23 100644 --- a/invokeai/frontend/web/src/features/controlLayers/konva/events.ts +++ b/invokeai/frontend/web/src/features/controlLayers/konva/events.ts @@ -121,7 +121,9 @@ const getColorUnderCursor = (stage: Konva.Stage): RgbaColor | null => { if (!pos) { return null; } - const ctx = stage.toCanvas({ x: pos.x, y: pos.y, width: 1, height: 1 }).getContext('2d'); + const ctx = stage + .toCanvas({ x: pos.x, y: pos.y, width: 1, height: 1, imageSmoothingEnabled: false }) + .getContext('2d'); if (!ctx) { return null; }