forked from woltapp/blurhash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
74 lines (65 loc) · 1.62 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<title>Blurhash test file</title>
<style>
* {
box-sizing: border-box;
}
.wrapper {
display: flex;
align-items: flex-start;
}
.blurhashWrapper {
padding: 0 20px;
}
canvas {
display: block;
width: 632px;
height: 356px;
background: #ccc;
}
#blurhash {
margin-top: 20px;
font-size: 24px;
width: 632px;
}
label {
display: block;
padding: 10px 0;
}
label > span {
display: inline-block;
width: 100px;
}
</style>
</head>
<body>
<h1>BlurHash demo</h1>
<div class="wrapper">
<div>
<h2>Encode</h2>
<canvas id="original" width="100" height="100"></canvas>
<label>
<span>File:</span>
<input id="fileinput" type="file" accept="image/*" />
</label>
<label>
<span>Components</span>
<input type="number" id="x" value="4" min="1" max="9" />
×
<input type="number" id="y" value="3" min="1" max="9" />
</label>
</div>
<div class="blurhashWrapper">
<h2>Blurhash</h2>
<input id="blurhash" type="text" value="" />
</div>
<div>
<h2>Decode</h2>
<canvas id="canvas" width="32" height="32"></canvas>
</div>
</div>
<script src="./demo.js"></script>
</body>
</html>