Skip to content

Commit 31599ef

Browse files
committed
Make nearestNeighborScale actuall use nearest neighbor
1 parent 90d99b7 commit 31599ef

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/screenshot_resizer/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ function nearestNeighborScale(image, width, height) {
33
canvas.width = width;
44
canvas.height = height;
55
const ctx = canvas.getContext('2d');
6+
ctx.imageSmoothingEnabled = false;
67
ctx.drawImage(image, 0, 0, width, height);
78
return canvas;
89
}

0 commit comments

Comments
 (0)