-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
77 lines (73 loc) · 5.34 KB
/
test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<html>
<body>
<canvas width="16" height="16" id="target" />
<script>
var src = [
48, 157, 7, 255, 48, 157, 7, 255, 48, 157, 7, 255, 48, 157, 7, 255, 49, 157, 7, 255, 48,
157, 7, 255, 48, 158, 8, 255, 48, 158, 7, 255, 49, 158, 7, 255, 49, 158, 7, 255, 49, 158, 7,
255, 49, 158, 7, 255, 49, 158, 7, 255, 49, 158, 8, 255, 50, 158, 7, 255, 50, 159, 8, 255,
48, 157, 7, 255, 48, 157, 7, 255, 48, 157, 7, 255, 48, 157, 7, 255, 49, 157, 7, 255, 48,
157, 7, 255, 48, 158, 7, 255, 48, 158, 7, 255, 48, 158, 7, 255, 48, 158, 7, 255, 48, 158, 7,
255, 49, 158, 7, 255, 48, 158, 7, 255, 49, 158, 7, 255, 49, 158, 7, 255, 49, 158, 7, 255,
48, 157, 7, 255, 48, 157, 7, 255, 48, 158, 7, 255, 48, 157, 7, 255, 48, 157, 7, 255, 48,
157, 7, 255, 48, 158, 7, 255, 48, 158, 7, 255, 48, 158, 7, 255, 49, 158, 7, 255, 48, 158, 7,
255, 49, 158, 7, 255, 49, 158, 7, 255, 49, 158, 8, 255, 49, 158, 7, 255, 50, 159, 7, 255,
48, 157, 7, 255, 48, 157, 7, 255, 48, 157, 7, 255, 48, 157, 7, 255, 49, 157, 7, 255, 48,
157, 7, 255, 48, 158, 7, 255, 48, 157, 7, 255, 48, 158, 7, 255, 48, 158, 7, 255, 48, 158, 7,
255, 49, 158, 7, 255, 48, 158, 7, 255, 48, 158, 7, 255, 48, 158, 7, 255, 49, 158, 7, 255,
48, 158, 7, 255, 47, 157, 7, 255, 48, 158, 7, 255, 48, 157, 7, 255, 48, 158, 7, 255, 48,
157, 7, 255, 48, 158, 7, 255, 48, 158, 7, 255, 48, 158, 7, 255, 49, 158, 7, 255, 48, 158, 7,
255, 49, 158, 7, 255, 48, 158, 7, 255, 49, 158, 7, 255, 49, 158, 7, 255, 50, 159, 7, 255,
48, 157, 7, 255, 48, 157, 7, 255, 48, 157, 7, 255, 48, 157, 7, 255, 49, 158, 7, 255, 48,
157, 7, 255, 48, 158, 7, 255, 48, 157, 7, 255, 48, 158, 7, 255, 48, 157, 7, 255, 48, 158, 7,
255, 48, 158, 7, 255, 48, 158, 7, 255, 48, 158, 7, 255, 48, 158, 7, 255, 48, 158, 7, 255,
48, 158, 7, 255, 47, 157, 7, 255, 48, 158, 7, 255, 48, 157, 7, 255, 48, 158, 7, 255, 48,
157, 7, 255, 48, 158, 7, 255, 48, 157, 7, 255, 48, 158, 7, 255, 49, 158, 7, 255, 48, 158, 7,
255, 49, 158, 7, 255, 48, 158, 7, 255, 49, 158, 7, 255, 48, 158, 7, 255, 49, 158, 7, 255,
48, 158, 7, 255, 48, 157, 7, 255, 48, 157, 7, 255, 48, 157, 7, 255, 49, 158, 7, 255, 48,
157, 7, 255, 48, 158, 7, 255, 48, 157, 7, 255, 48, 158, 7, 255, 48, 157, 7, 255, 48, 158, 7,
255, 48, 158, 7, 255, 48, 158, 7, 255, 48, 158, 7, 255, 48, 158, 7, 255, 48, 158, 7, 255,
48, 158, 7, 255, 47, 157, 7, 255, 48, 158, 7, 255, 48, 157, 7, 255, 48, 158, 7, 255, 48,
157, 7, 255, 48, 158, 7, 255, 48, 157, 7, 255, 48, 158, 7, 255, 48, 157, 7, 255, 48, 158, 7,
255, 48, 158, 7, 255, 48, 158, 7, 255, 49, 158, 7, 255, 48, 158, 7, 255, 49, 158, 7, 255,
49, 158, 7, 255, 48, 157, 7, 255, 48, 157, 7, 255, 48, 157, 7, 255, 49, 158, 7, 255, 48,
157, 7, 255, 48, 158, 7, 255, 48, 157, 7, 255, 48, 158, 7, 255, 48, 157, 7, 255, 48, 158, 7,
255, 47, 157, 7, 255, 48, 158, 7, 255, 48, 157, 7, 255, 48, 158, 7, 255, 48, 158, 7, 255,
48, 157, 7, 255, 47, 157, 7, 255, 48, 157, 7, 255, 47, 156, 7, 255, 48, 157, 7, 255, 47,
156, 7, 255, 48, 157, 7, 255, 47, 157, 7, 255, 48, 157, 7, 255, 48, 157, 7, 255, 48, 157, 7,
255, 48, 157, 7, 255, 48, 158, 7, 255, 48, 157, 7, 255, 48, 158, 7, 255, 48, 157, 7, 255,
49, 158, 7, 255, 48, 157, 7, 255, 48, 158, 7, 255, 48, 157, 7, 255, 49, 158, 8, 255, 48,
157, 7, 255, 48, 158, 7, 255, 48, 157, 7, 255, 48, 158, 7, 255, 48, 157, 7, 255, 48, 157, 7,
255, 47, 157, 7, 255, 48, 157, 7, 255, 48, 157, 7, 255, 48, 157, 7, 255, 48, 157, 7, 255,
48, 157, 7, 255, 47, 157, 7, 255, 48, 157, 7, 255, 47, 156, 7, 255, 48, 157, 7, 255, 47,
156, 7, 255, 48, 157, 7, 255, 47, 157, 7, 255, 48, 157, 7, 255, 48, 157, 7, 255, 48, 157, 8,
255, 48, 157, 7, 255, 48, 157, 7, 255, 48, 157, 7, 255, 48, 157, 7, 255, 48, 157, 7, 255,
49, 158, 8, 255, 48, 157, 7, 255, 49, 158, 8, 255, 48, 157, 7, 255, 49, 158, 8, 255, 48,
157, 7, 255, 48, 158, 7, 255, 48, 157, 7, 255, 48, 158, 7, 255, 48, 157, 7, 255, 48, 157, 7,
255, 47, 157, 7, 255, 48, 157, 7, 255, 48, 156, 7, 255, 48, 157, 7, 255, 48, 157, 7, 255,
48, 157, 7, 255, 47, 157, 7, 255, 48, 157, 7, 255, 47, 156, 7, 255, 48, 157, 7, 255, 47,
156, 7, 255, 48, 157, 7, 255, 47, 157, 7, 255, 48, 157, 7, 255, 48, 157, 7, 255, 48, 157, 8,
255, 48, 157, 7, 255, 48, 157, 7, 255, 48, 156, 7, 255, 48, 157, 7, 255, 48, 156, 7, 255,
49, 158, 8, 255, 48, 158, 7, 255, 49, 158, 8, 255, 48, 157, 7, 255, 49, 158, 8, 255, 48,
157, 7, 255, 49, 158, 8, 255, 48, 157, 7, 255, 49, 158, 8, 255, 48, 157, 7, 255, 48, 157, 8,
255, 48, 157, 7, 255, 48, 157, 7, 255, 48, 156, 7, 255, 48, 157, 7, 255, 48, 156, 7, 255
]
var input = Uint8Array.from(src)
var canvas = document.getElementById('target')
var ctx = canvas.getContext('2d')
var imgData = ctx.getImageData(0, 0, 16, 16)
var data = imgData.data
for (var i = 0; i < data.length; i++) {
data[i] = src[i]
}
ctx.putImageData(imgData, 0, 0)
// create a new img object
var image = new Image()
// set the img.src to the canvas data url
image.src = canvas.toDataURL()
// image.src = src
// append the new img object to the page
document.body.appendChild(image)
</script>
</body>
</html>