回答編集履歴
3
chousei
test
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
const bin = atob(data.replace(/^.*,/, ''));
|
10
10
|
|
11
|
-
const buffer = new Uint8Array(bin.length).map((x
|
11
|
+
const buffer = new Uint8Array(bin.length).map((_,x)=>bin.charCodeAt(x));
|
12
12
|
|
13
13
|
const blob = new Blob([buffer.buffer], {type});
|
14
14
|
|
2
chousei
test
CHANGED
@@ -8,13 +8,7 @@
|
|
8
8
|
|
9
9
|
const bin = atob(data.replace(/^.*,/, ''));
|
10
10
|
|
11
|
-
const buffer = new Uint8Array(bin.length);
|
11
|
+
const buffer = new Uint8Array(bin.length).map((x,y)=>bin.charCodeAt(y));
|
12
|
-
|
13
|
-
for (var i = 0; i < bin.length; i++) {
|
14
|
-
|
15
|
-
buffer[i] = bin.charCodeAt(i);
|
16
|
-
|
17
|
-
}
|
18
12
|
|
19
13
|
const blob = new Blob([buffer.buffer], {type});
|
20
14
|
|
1
chousei
test
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
```javascript
|
2
2
|
|
3
|
-
let data
|
3
|
+
let data="data:image/gif;base64,R0lGODdhEAAQAIACAAUFBfr6+iwAAAAAEAAQAAACJoyPqcsIrV6QE1hbscSGzl4dXJiJ1HM66ua1nPclG9ixNgzl+s4XADs=";
|
4
4
|
|
5
5
|
const filename="test.gif";
|
6
6
|
|