-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
179 lines (166 loc) · 5.11 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css"
integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
<link rel="shortcut icon" href="assets/img/fav.png" type="image/x-icon" />
<!-- fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Quicksand&family=Rubik:ital,wght@0,300;1,300&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="assets/styles/app.css" />
<title>Ankit Image Editor</title>
</head>
<body>
<div class="img-editor">
<div class="side-bar">
<div class="filter-container">
<label for="blur">Blur</label>
<input
type="range"
id="blur"
value="0"
min="0"
max="10"
step="0.1"
class="slider-inputs"
/>
<label for="contrast">Contrast</label>
<input
type="range"
id="contrast"
value="100"
min="0"
max="200"
class="slider-inputs"
/>
<label for="hue">Hue-Rotate</label>
<input
type="range"
id="hue"
value="0"
min="0"
max="360"
class="slider-inputs"
/>
<label for="sepia">Sepia</label>
<input
type="range"
id="sepia"
value="0"
min="0"
max="1"
step="0.1"
class="slider-inputs"
/>
<label for="GrayScale">Gray Scale</label>
<input
type="range"
id="GrayScale"
value="0"
min="0"
max="100"
class="slider-inputs"
/>
<label for="opacity">Opacity</label>
<input
type="range"
id="opacity"
value="1"
min="0"
max="1"
step="0.1"
class="slider-inputs"
/>
<label for="invert">Invert</label>
<input
type="range"
id="invert"
value="0"
min="0"
max="100"
class="slider-inputs"
/>
<label for="saturate">Saturate</label>
<input
type="range"
id="saturate"
value="1"
min="0"
max="1"
step="0.1"
class="slider-inputs"
/>
<label for="brightness">Brightness</label>
<input
type="range"
id="brightness"
value="100"
min="0"
max="200"
class="slider-inputs"
/>
<div class="flip-buttons">
<div class="flip-option">
<input type="radio" name="flip" id="noFlip" checked />
<label for="noFlip">No flip</label>
</div>
<div class="flip-option">
<input type="radio" name="flip" id="flipX" />
<label for="flipX">Flip x</label>
</div>
<div class="flip-option">
<input type="radio" name="flip" id="flipY" />
<label for="flipY">Flip Y</label>
</div>
</div>
<div class="btn-container">
<button type="reset" class="reset">Reset</button>
<button class="download" type="button" onclick="download()">
Download
</button>
<label for="upload"><i class="fa fa-upload"></i></label>
<input type="file" id="upload" accept="image/*" />
</div>
</div>
</div>
<div class="img-bar">
<div class="img-container">
<img src="" alt="Upload Your Image" class="choosenImg" />
</div>
</div>
</div>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/dom-to-image/2.6.0/dom-to-image.min.js"
integrity="sha512-01CJ9/g7e8cUmY0DFTMcUw/ikS799FHiOA0eyHsUWfOetgbx/t6oV4otQ5zXKQyIrQGTHSmRVPIgrgLcZi/WMA=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/2.0.5/FileSaver.min.js"
integrity="sha512-Qlv6VSKh1gDKGoJbnyA5RMXYcvnpIqhO++MhIM2fStMcGT9i2T//tSwYFlcyoRRDcDZ+TYHpH8azBBCyhpSeqw=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
></script>
<script>
// download button
function download() {
domtoimage.toBlob(document.querySelector("img")).then(function (blob) {
window.saveAs(blob, "File.png");
});
}
</script>
<script src="app.js"></script>
</body>
</html>