Skip to content

Commit 8fc4f9a

Browse files
committed
fix: typo causing getImageData to give wrong output
1 parent 96ac81f commit 8fc4f9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/context2d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,7 @@ export class CanvasRenderingContext2D {
10661066
throw new Error("getImageData is only supported on Canvas");
10671067
}
10681068
const data = new Uint8Array(sw * sh * 4);
1069-
this[_canvas].readPixels(sx, sy, sh, sh, data, "srgb");
1069+
this[_canvas].readPixels(sx, sy, sw, sh, data, "srgb");
10701070
return new ImageData(data, sw, sh);
10711071
}
10721072

0 commit comments

Comments
 (0)