oldfart commited on
Commit
96dab67
·
1 Parent(s): 379f509

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +60 -4
index.html CHANGED
@@ -5,7 +5,63 @@
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>Image Format Converter</title>
7
  <style>
8
- /* ... (unchanged styles) */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  </style>
10
  </head>
11
  <body>
@@ -14,7 +70,7 @@
14
  <form id="imageForm">
15
  <label for="imageInput">Select an Image:</label>
16
  <input type="file" id="imageInput" accept="image/*" required onchange="detectImageFormat()">
17
-
18
  <p id="formatInfo">Detected Format: <span id="formatDisplay"></span></p>
19
 
20
  <label for="targetFormat">Choose Target Format:</label>
@@ -79,8 +135,8 @@
79
  const canvas = document.createElement('canvas');
80
  const ctx = canvas.getContext('2d');
81
 
82
- const maxWidth = 800; // You can adjust the maximum width as needed
83
- const maxHeight = 800; // You can adjust the maximum height as needed
84
 
85
  let newWidth = img.width;
86
  let newHeight = img.height;
 
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>Image Format Converter</title>
7
  <style>
8
+ body {
9
+ font-family: 'Arial', sans-serif;
10
+ max-width: 600px;
11
+ margin: 20px auto;
12
+ padding: 20px;
13
+ background-color: #f4f4f4;
14
+ border-radius: 10px;
15
+ }
16
+
17
+ h1 {
18
+ text-align: center;
19
+ color: #333;
20
+ }
21
+
22
+ form {
23
+ background-color: #fff;
24
+ padding: 20px;
25
+ border-radius: 8px;
26
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
27
+ }
28
+
29
+ label, select, button, input {
30
+ display: block;
31
+ margin-bottom: 15px;
32
+ }
33
+
34
+ select, input {
35
+ width: 100%;
36
+ padding: 10px;
37
+ border: 1px solid #ccc;
38
+ border-radius: 4px;
39
+ }
40
+
41
+ button {
42
+ background-color: #4caf50;
43
+ color: #fff;
44
+ padding: 10px;
45
+ border: none;
46
+ border-radius: 4px;
47
+ cursor: pointer;
48
+ transition: background-color 0.3s ease;
49
+ }
50
+
51
+ button:hover {
52
+ background-color: #45a049;
53
+ }
54
+
55
+ a {
56
+ color: #2196F3;
57
+ text-decoration: none;
58
+ display: block;
59
+ margin-top: 10px;
60
+ }
61
+
62
+ a:hover {
63
+ text-decoration: underline;
64
+ }
65
  </style>
66
  </head>
67
  <body>
 
70
  <form id="imageForm">
71
  <label for="imageInput">Select an Image:</label>
72
  <input type="file" id="imageInput" accept="image/*" required onchange="detectImageFormat()">
73
+
74
  <p id="formatInfo">Detected Format: <span id="formatDisplay"></span></p>
75
 
76
  <label for="targetFormat">Choose Target Format:</label>
 
135
  const canvas = document.createElement('canvas');
136
  const ctx = canvas.getContext('2d');
137
 
138
+ const maxWidth = 800;
139
+ const maxHeight = 800;
140
 
141
  let newWidth = img.width;
142
  let newHeight = img.height;