-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
50 lines (50 loc) · 2.18 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
<!DOCTYPE html>
<html>
<head>
<title>Local Picture Compressor</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div style="text-align: center;">
<h1>Local Picture Compressor</h1>
<p style="font-size: 24px;">Totally local and private, no watermark, works offline.</p>
<input type="file" id="imageInput" accept="image/*" onchange="handleImageUpload(event)" style="font-size: 15px; padding: 10px;">
<button onclick="resetValues()">Reset</button>
<br>
<div>
<label for="sizeSlider">Size:</label>
<input type="range" id="sizeSlider" min="0" max="100" value="50" style="width: 300px;" oninput="document.getElementById('sizeValue').innerText = this.value + '%'">
<span id="sizeValue">50%</span>
</div>
<br>
<div>
<label for="widthSlider">Width:</label>
<input type="range" id="widthSlider" min="1" max="100" value="50" style="width: 300px;" oninput="document.getElementById('widthValue').innerText = this.value + '%'">
<span id="widthValue">50%</span>
</div>
<br>
<div>
<label for="heightSlider">Height:</label>
<input type="range" id="heightSlider" min="1" max="100" value="50" style="width: 300px;" oninput="document.getElementById('heightValue').innerText = this.value + '%'">
<span id="heightValue">50%</span>
</div>
<div id="imageContainer">
<div style="display: flex; gap: 20px;">
<div id="original-image" style="display: flex; flex-direction: column; align-items: center;">
<h2>Original Image</h2>
<div id="originalProperties" style="text-align: center;"></div>
<img id="originalImg" src="" alt="Original Image" style="display: none;" width="500">
<br>
</div>
<div style="display: flex; flex-direction: column; align-items: center;">
<h2>Compressed Image</h2>
<div id="compressedProperties" style="text-align: center;"></div>
<img id="compressedImg" src="" alt="Compressed Image" style="display: none;" width="500">
<br>
<button onclick="downloadImage()">Download Compressed Image</button>
</div>
</div>
</div>
<script src="script.js"></script>
</body>
</html>