-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
123 lines (113 loc) · 4.16 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>DC Stipple</title>
<!-- Bootstrap CSS -->
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
/>
</head>
<body>
<section class="py-5">
<div class="container">
<h1 class="mb-4">Image Stippler</h1>
<div class="row">
<!-- Column 1: Original Image + Load Button -->
<div class="col-md-4 mb-4">
<h4>Original</h4>
<!-- Keep image in a square ratio -->
<div class="ratio ratio-1x1 border mb-3">
<img
id="imagePreview"
src=""
alt="No image loaded"
class="img-fluid"
style="object-fit: contain"
/>
</div>
<!-- Hidden file input element -->
<input
type="file"
id="hiddenFileInput"
accept="image/*"
style="display: none;"
/>
<button id="loadImageButton" class="btn btn-info">
Load
</button>
</div>
<!-- Column 2: Sliders, Radio buttons, and Process Button -->
<div class="col-md-4 mb-4">
<!-- Example Sliders -->
<div class="mb-4">
<label for="slider1" class="form-label">Slider 1</label>
<input
type="range"
class="form-range"
id="slider1"
min="0"
max="100"
/>
<label for="slider2" class="form-label">Slider 2</label>
<input
type="range"
class="form-range"
id="slider2"
min="0"
max="100"
/>
</div>
<!-- Radio buttons -->
<div class="mb-4">
<div class="form-check">
<input
class="form-check-input"
type="radio"
name="radio--black-or-white"
id="radioBW"
/>
<label class="form-check-label" for="radioBW">
Black & White
</label>
</div>
<div class="form-check">
<input
class="form-check-input"
type="radio"
name="radio--black-or-white"
id="radioColor"
/>
<label class="form-check-label" for="radioColor">
Colour
</label>
</div>
</div>
<button id="startButton" class="btn btn-primary">
Process
</button>
</div>
<!-- Column 3: Processed Image + Save Button -->
<div class="col-md-4 mb-4">
<h4>Output</h4>
<div class="ratio ratio-1x1 border mb-3">
<div
id="imageOutput"
style="object-fit: contain;"
></div>
</div>
<button id="saveImageButton" class="btn btn-success">
Save
</button>
</div>
</div>
</div>
</section>
<!-- Scripts -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/p5.js"></script>
<script src="https://d3js.org/d3.v7.min.js"></script>
<script src="front_end.js"></script>
</body>
</html>