Skip to content

Commit

Permalink
fix: typo causing getImageData to give wrong output
Browse files Browse the repository at this point in the history
  • Loading branch information
DjDeveloperr committed Oct 3, 2024
1 parent 96ac81f commit 8fc4f9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/context2d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ export class CanvasRenderingContext2D {
throw new Error("getImageData is only supported on Canvas");
}
const data = new Uint8Array(sw * sh * 4);
this[_canvas].readPixels(sx, sy, sh, sh, data, "srgb");
this[_canvas].readPixels(sx, sy, sw, sh, data, "srgb");
return new ImageData(data, sw, sh);
}

Expand Down

0 comments on commit 8fc4f9a

Please sign in to comment.