Repository navigation
Expand file tree
/
Copy patheditor.html
More file actions
212 lines (167 loc) · 8.9 KB
/
Copy patheditor.html
File metadata and controls
212 lines (167 loc) · 8.9 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
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Editor</title>
<link rel="icon" href="favicon.ico" />
<link rel="stylesheet" href="editor.css" />
<!-- Include bootstrap CSS framework -->
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi"
crossorigin="anonymous"/>
</head>
<br>
<header>
<h1>MemeFryer</h1>
<br>
<!-- Use a <ul> element for the navigation -->
<ul class="menu">
<li><a href="index.html">Home</a></li>
<li><a href="editor.html" style="background-color: #c75a0075;">Editor</a></li>
<li><a href="community.html">Community</a></li>
<li><a href="about.html">About</a></li>
<li><a href="profile.html">Profile:</a><span id="username-placeholder"></span></li>
</ul>
</header>
<div class="editor">
<div class="toolbar">
<div class="toolbar-item">
<u style="font-weight:bold">NOT EVERYTHING WORKS YET</u>
</div>
<div class="toolbar-item">
<input type="file" id="imageFileInput">
</div>
<div class="toolbar-item">
<label>Brightness: <input type="range" class="slider" id="brightness-value" value="0.1" min="-1" max="1" step="0.003921" oninput="document.getElementById('brightness-slider-value').textContent = this.value;"></label>
<span id="brightness-slider-value">0.1</span>
</div>
<div class="toolbar-item">
<label>Hue: <input type="range" class="slider" id="hue-value" value="0" min="-2" max="2" step="0.002" oninput="document.getElementById('hue-slider-value').textContent = this.value;"></label>
<span id="hue-slider-value">0</span>
</div>
<div class="toolbar-item">
<label>Contrast: <input type="range" class="slider" id="contrast-value" value="0" min="-1" max="1" step="0.003921" oninput="document.getElementById('contrast-slider-value').textContent = this.value;"></label>
<span id="contrast-slider-value">0</span>
</div>
<div class="toolbar-item">
<label>Saturation: <input type="range" class="slider" id="saturation-value" value="0" min="-1" max="1" step="0.003921" oninput="document.getElementById('saturation-slider-value').textContent = this.value;"></label>
<span id="saturation-slider-value">0</span>
</div>
<div class="toolbar-item">
<label>Blur: <input type="range" class="slider" id="blur-value" value="0.1" min="0" max="1" step="0.01" oninput="document.getElementById('blur-slider-value').textContent = this.value;"></label>
<span id="blur-slider-value">0.1</span>
</div>
<div class="toolbar-item">
<label>Inversion: <input type="range" class="slider" id="inversion-value" value="0.1" min="0" max="1" step="0.01" oninput="document.getElementById('inversion-slider-value').textContent = this.value;"></label>
<span id="inversion-slider-value">0.1</span>
<!-- this might not work because it was a checkbox where I found it -->
<!-- <p>
<label><span>Invert:</span> <input type="checkbox" id="invert"></label>
</p> -->
</div>
<div class="toolbar-item">
<label>Sharpen: <input type="range" class="slider" id="sharpen-value" value="0.1" min="0" max="1" step="0.01" oninput="document.getElementById('sharpen-slider-value').textContent = this.value;"></label>
<span id="sharpen-slider-value">0.1</span>
<!-- this might not work because it was a checkbox where I found it -->
<!-- <p>
<label><span>Sharpen:</span> <input type="checkbox" id="sharpen"></label>
</p> -->
</div>
<div class="toolbar-item">
<label>Vibrance: <input type="range" class="slider" id="vibrance-value" value="0" min="-1" max="1" step="0.003921" oninput="document.getElementById('vibrance-slider-value').textContent = this.value;"></label>
<span id="vibrance-slider-value">0</span>
</div>
<div class="toolbar-item">
<label>Pixelate: <input type="range" class="slider" id="pixelate-value" value="4" min="2" max="20" oninput="document.getElementById('pixelate-slider-value').textContent = this.value;"></label>
<span id="pixelate-slider-value">4</span>
</div>
<div class="toolbar-item">
<label>Noise: <input type="range" class="slider" id="noise-value" value="100" min="0" max="1000" oninput="document.getElementById('noise-slider-value').textContent = this.value;"></label>
<span id="noise-slider-value">100</span>
</div>
<br>
<!-- ! idk if I want/need this -->
<!-- <div class="toolbar-item">
<label><span>Remove color:</span> <input type="checkbox" id="remove-color"></label>
<label>Color: <input type="color" id="remove-color-color" value="#00f900"></label><br>
<label>Distance: <input type="range" class="slider" id="remove-color-distance" value="0.02" min="0" max="1" step="0.01" oninput="document.getElementById('slider-value').textContent = this.value;"></label>
</div> -->
<br>
<!-- ! idk if I want/need this -->
<!-- <div class="toolbar-item">
<label><span>Blend Color:</span> <input type="checkbox" id="blend"></label>
<br>
<label>Mode:</label>
<select id="blend-mode" name="blend-mode">
<option selected="" value="add">Add</option>
<option value="diff">Diff</option>
<option value="subtract">Subtract</option>
<option value="multiply">Multiply</option>
<option value="screen">Screen</option>
<option value="lighten">Lighten</option>
<option value="darken">Darken</option>
<option value="overlay">Overlay</option>
<option value="exclusion">Exclusion</option>
<option value="tint">Tint</option>
</select>
<br>
<label>Color: <input type="color" id="blend-color" value="#00f900"></label><br>
<label>Alpha: <input type="range" id="blend-alpha" min="0" max="1" value="1" step="0.01"></label><br>
</div> -->
<br>
<div class="toolbar-item">
<input type="button" onclick="alert('pretend this works 🥶')" value="Undo" style="background-color: #3d3d3d">
<input type="button" onclick="alert('pretend this works 🥶')" value="Redo" style="background-color: #3d3d3d">
<input type="button" onclick="alert('pretend this works 🥶')" value="Download" style="background-color: #3d3d3d"/>
<input type="reset" onclick="alert('pretend this works 🥶')" value="Reset" style="background-color: #3d3d3d" >
</div>
<!-- <label for="bri">Brightness</label>
<input type="range" value="21" id="bri"/>
<label for="con">Contrast</label>
<input type="range" value="21" id="con"/>
<label for="sat">Saturation</label>
<input type="range" value="21" id="sat"/>
<label for="sha">Sharpness</label>
<input type="range" value="21" id="sha"/>
<label for="hue">Hue</label>
<input type="range" value="21" id="hue"/>
<label for="tem">Temperature</label>
<input type="range" value="21" id="tem"/>
<label for="exp">Exposure</label>
<input type="range" value="21" id="exp"/>
<label for="gam">Gamma Correction</label>
<input type="range" value="21" id="gam"/>
<label for="vib">Vibrance</label>
<input type="range" value="21" id="vib"/>
<label for="noi">Noise</label>
<input type="range" value="21" id="noi"/>
<label for="blu">Blur</label>
<input type="range" value="21" id="blu"/>
<label for="inv">Invert Colors</label>
<input type="range" value="21" id="inv"/>
<label for="rot">Image Rotation</label>
<input type="range" value="21" id="rot" />
<label for="t-txt">Top Text</label>
<input type="text" id="t-txt" style="background-color: #3d3d3d"/>
<label for="b-txt">Bottom Text</label>
<input type="text" id="b-txt" style="background-color: #3d3d3d"/>
<input type="button" value="Undo" style="background-color: #3d3d3d">
<input type="button" value="Redo" style="background-color: #3d3d3d">
<input type="button" onclick="alert('pretend this works 🥶')" value="Download" style="background-color: #3d3d3d"/>
<input type="reset" value="Reset" style="background-color: #3d3d3d">
</form> -->
</div>
<div class="canvas-container" style="width: 1300px; height: 700px; position: relative; user-select: none;"><canvas id="c" width="1000" height="700" class="upper-canvas" style="position: absolute; width: 1300px; height: 700px; left: 0px; top: 0px; touch-action: none; user-select: none;"></canvas></div>
<!-- </div> -->
<footer>
<hr/>
<p>Luke Bacigalupi<p>
<p><a href="https://github.com/lbacigal/startup.git">GitHub</a></p>
<p>Started on 1/11/24</p>
</footer>
<script src="https://cdn.jsdelivr.net/npm/fabric"></script>
<script src="editor2.js"></script>
</html>