-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
63 lines (54 loc) · 1.78 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
<!DOCTYPE html>
<html>
<head>
<title>dither</title>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
<link rel='stylesheet' type='text/css' href='style.css'>
</head>
<body>
<h1>dither-dream: variations on the Floyd-Steinberg dithering algorithm</h1>
<!--
Image URL:
-->
<input id='url' type='hidden' value='image/vanitas.png' />
<section id='display-section' ondrop='dropFile(event);' ondragover='dragOver(event);' ondragenter='dragOver(event)';>
<canvas id='screen' width=512 height=512></canvas>
</section>
<section id='dashboard-section'>
<div>
For details about how this works, see the README at
<br>
<a href='https://github.com/kgjenkins/dither-dream'>https://github.com/kgjenkins/dither-dream</a>
</div>
<div>
Weights for distributing error to neighboring pixels:
<br>
<input id='a' value='7' type='range' step='1' min='-24' max='24' />
<label id='a-label'>7</label> (right)
<br>
<input id='b' value='3' type='range' step='1' min='-24' max='24' />
<label id='b-label'>3</label> (down left)
<br>
<input id='c' value='5' type='range' step='1' min='-24' max='24' />
<label id='c-label'>5</label> (down)
<br>
<input id='d' value='1' type='range' step='1' min='-24' max='24' />
<label id='d-label'>1</label> (down right)
<br>
<br>
<input id='contrast' value='0' type='range' step='0.01' min='-1' max='1' />
<label id='contrast-label'>0</label> (contrast)
<br>
<br>
<button id='reset' onclick='randomize()'>randomize</button>
<br>
<br>
<button id='reset' onclick='reset()'>reset to default values</button>
<br>
<br>
<button id='reset' onclick='toggleOriginal()'>toggle original image</button>
</div>
</section>
<script src='dither-dream.js'></script>
</body>
</html>