-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.html
More file actions
87 lines (73 loc) · 1.44 KB
/
Copy pathtest.html
File metadata and controls
87 lines (73 loc) · 1.44 KB
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
78
79
80
81
82
83
84
85
86
87
<!doctype html>
<html>
<head>
<style>
* {
padding:0;
margin:0;
overflow:hidden;
}
header {
position:relative;
z-index:2;
}
h1{
padding:40px 0 0 40px;
color:white;
text-transform: uppercase;
font-family: "Raleway";
letter-spacing: 4px;
font-weight:bold;
font-size:2.6em;
}
h2{
padding:10px 0 0 40px;
color:white;
font-family: "Raleway";
font-weight:200;
font-size:1.5em;
}
canvas{
position:fixed;
top:0;
left:0;
z-index:1;
}
</style>
<title>ASDF Sort Pixels Test</title>
</head>
<body>
<header>
<h1>Daniele Ciminieri</h1>
<h2>Bit-to-pixel developer, design researcher</h2>
</header>
</body>
<script type="text/javascript" src="sortpixels2.js"></script>
<script type="text/javascript">
var imageUrl = "volcs.png";
/*
nomansland.png
mode 1
brightnessValue = 44;
upperBright = 94;
columns only
*/
/*
volcs.png
mode 0
blackValue = Math.random()*(-12500000) -3000000
rows
*/
//var imageUrl = "test.png";
var img = new Image();
img.onload = function(){
// params:
// - image object
// - mode (0 = black, 1 = brightness, 2 = white, default = 0)
// - iterations (default = 1)
var sortedCanvas = sortPixels(img, 0, 1);
document.body.appendChild(sortedCanvas);
}
img.src = imageUrl;
</script>
</html>