diff options
author | Hajime-san <41257923+Hajime-san@users.noreply.github.com> | 2024-05-07 20:47:42 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-07 04:47:42 -0700 |
commit | e7a2317f5a18751ecc1a63b3464690b125839ecf (patch) | |
tree | 505bb7762e5b77ca43c71804e9af5503c1ba6edb /ext/canvas/01_image.js | |
parent | cbb78e138ffbfc92ca64f2cce56dd5c629e4f142 (diff) |
fix(ext/web): properly handle `Blob` case for `createImageBitmap` (#23518)
fixes https://github.com/denoland/deno/issues/22649
Diffstat (limited to 'ext/canvas/01_image.js')
-rw-r--r-- | ext/canvas/01_image.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/canvas/01_image.js b/ext/canvas/01_image.js index a738f7992..6fb1ee62f 100644 --- a/ext/canvas/01_image.js +++ b/ext/canvas/01_image.js @@ -238,7 +238,9 @@ function createImageBitmap( "InvalidStateError", ); } - const { data: imageData, width, height } = op_image_decode_png(data); + const { data: imageData, width, height } = op_image_decode_png( + new Uint8Array(data), + ); const processedImage = processImage( imageData, width, |