forked from ZakaDev22/ImageEditor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
78 lines (75 loc) · 3.03 KB
/
Copy pathindex.html
File metadata and controls
78 lines (75 loc) · 3.03 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Image Editor</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
</header>
<main>
<div class="container">
<section class="image-container">
<div id="imageBox">
<img id="img">
</div>
<div class="upload">
<label for="file">Upload</label>
<input type="file" id="file" accept="image/*">
</div>
</section>
<div class="tools">
<ul>
<li>
<label for="saturate">Saturate</label>
<input type="range" id="saturate" min="0" max="256" value="128" oninput="updateValue(this.value, this.id)">
<span id="saturateValue">128</span>
</li>
<li>
<label for="contrast">Contrast</label>
<input type="range" id="contrast" min="0" max="256" value="128" oninput="updateValue(this.value, this.id)">
<span id="contrastValue">128</span>
</li>
<li>
<label for="brightness">Brightness</label>
<input type="range" id="brightness" min="0" max="256" value="128" oninput="updateValue(this.value, this.id)">
<span id="brightnessValue">128</span>
</li>
<li>
<label for="grayscale">Grayscale</label>
<input type="range" id="grayscale" step="0.1" min="0" max="1" value="0" oninput="updateValue(this.value, this.id)">
<span id="grayscaleValue">0</span>
</li>
<li>
<label for="sepia">Sepia</label>
<input type="range" id="sepia" min="0" max="100" value="0" oninput="updateValue(this.value, this.id)">
<span id="sepiaValue">0</span>
</li>
<li>
<label for="blur">Blur</label>
<input type="range" id="blur" step="0.1" min="0" max="10" value="0" oninput="updateValue(this.value, this.id)">
<span id="blurValue">0</span>
</li>
<li>
<label for="hue-rotate">Hue Rotate</label>
<input type="range" id="hue-rotate" min="0" max="360" value="0" oninput="updateValue(this.value, this.id)">
<span id="hue-rotateValue">0</span>
</li>
<li>
<a download="image" id="download">Download</a>
<span>Reset</span>
</li>
</ul>
</div>
</div>
</main>
<script>
function updateValue(value, id) {
document.getElementById(id + 'Value').textContent = value;
}
</script>
<script src="main.js"></script>
</body>
</html>