-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathI2B.html
34 lines (34 loc) · 1.25 KB
/
I2B.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
<!DOCTYPE html>
<html>
<head>
<title>Image to Base64</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="css/styles.css">
<script src="js/script.js"></script>
</head>
<body>
<div class="container">
<h1 class="text-center">Image to Base64</h1>
<form>
<div class="form-group">
<label for="fileInput">Select an image:</label>
<input type="file" class="form-control-file" id="fileInput" onchange="handleFileSelect(event)">
</div>
<div class="form-group">
<label for="formatSelect">Select image format:</label>
<select class="form-control" id="formatSelect">
<option value="image/png">PNG</option>
<option value="image/jpeg">JPEG</option>
<option value="image/gif">GIF</option>
</select>
</div>
</form>
<div id="imagePreview"></div>
<div class="form-group">
<label for="base64Data">Base64-encoded data:</label>
<textarea class="form-control" id="base64Data"></textarea>
</div>
<button type="button" class="btn btn-primary" onclick="copyToClipboard()">Copy to clipboard</button>
</div>
</body>
</html>