回答編集履歴

1

誤りを訂正

2021/03/15 04:21

投稿

Lhankor_Mhy
Lhankor_Mhy

スコア36134

test CHANGED
@@ -24,9 +24,9 @@
24
24
 
25
25
  const arr = new TextEncoder().encode(binary) // typedArray
26
26
 
27
- const blb = new Blob(arr, { type: 'image/png' }) // blob ←必要なのはこれ?
27
+ const blb = new Blob([arr.buffer], { type: 'image/png' }) // blob ←必要なのはこれ?
28
28
 
29
- const picture2 = await this.getBase64(file) // dataURL に戻すと
29
+ const picture2 = await this.getBase64(blb) // dataURL に戻すと
30
30
 
31
31
  console.log(picture === picture2) // 一致する
32
32