Skip to content

Commit

Permalink
fix(player): 修复TS类型错误
Browse files Browse the repository at this point in the history
  • Loading branch information
mark9804 committed Oct 29, 2024
1 parent 9b7800e commit cf3a098
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export function sprite2TransParent(img: Sprite) {
canvas.setAttribute("width", realWidth + "");
canvas.setAttribute("height", realHeight + "");
const ctx = canvas.getContext("2d")!;
ctx.drawImage(imgSource, 0, 0);
ctx.drawImage(imgSource as CanvasImageSource, 0, 0);

const pixel = ctx.getImageData(0, 0, realWidth, realHeight);
const data = pixel.data;
Expand Down

0 comments on commit cf3a098

Please sign in to comment.