Update index.html
Browse files- index.html +13 -13
index.html
CHANGED
@@ -80,17 +80,17 @@
|
|
80 |
|
81 |
<label for="targetFormat">Choose Target Format:</label>
|
82 |
<select id="targetFormat" required>
|
83 |
-
<option value="
|
84 |
-
<option value="
|
85 |
-
<option value="
|
86 |
-
<option value="
|
87 |
-
<option value="
|
88 |
-
<option value="
|
89 |
-
<option value="
|
90 |
-
<option value="
|
91 |
-
<option value="
|
92 |
-
<option value="
|
93 |
-
<option value="
|
94 |
</select>
|
95 |
|
96 |
<label for="customWidth">Custom Width (leave empty for original):</label>
|
@@ -145,7 +145,7 @@
|
|
145 |
formatDisplay.textContent = file.type;
|
146 |
|
147 |
// Check if the target format is supported
|
148 |
-
const supportedFormats = ['
|
149 |
|
150 |
if (!supportedFormats.includes(targetFormat)) {
|
151 |
alert('Unsupported target format. Please choose a supported format.');
|
@@ -188,7 +188,7 @@
|
|
188 |
const url = URL.createObjectURL(blob);
|
189 |
downloadLink.href = url;
|
190 |
downloadLink.style.display = 'block';
|
191 |
-
}, targetFormat
|
192 |
};
|
193 |
}
|
194 |
}
|
|
|
80 |
|
81 |
<label for="targetFormat">Choose Target Format:</label>
|
82 |
<select id="targetFormat" required>
|
83 |
+
<option value="bmp">BMP</option>
|
84 |
+
<option value="eps">EPS</option>
|
85 |
+
<option value="gif">GIF</option>
|
86 |
+
<option value="ico">ICO</option>
|
87 |
+
<option value="jpeg">JPG</option>
|
88 |
+
<option value="png">PNG</option>
|
89 |
+
<option value="psd">PSD</option>
|
90 |
+
<option value="svg+xml">SVG</option>
|
91 |
+
<option value="tga">TGA</option>
|
92 |
+
<option value="tiff">TIFF</option>
|
93 |
+
<option value="webp">WebP</option>
|
94 |
</select>
|
95 |
|
96 |
<label for="customWidth">Custom Width (leave empty for original):</label>
|
|
|
145 |
formatDisplay.textContent = file.type;
|
146 |
|
147 |
// Check if the target format is supported
|
148 |
+
const supportedFormats = ['bmp', 'eps', 'gif', 'ico', 'jpeg', 'png', 'psd', 'svg+xml', 'tga', 'tiff', 'webp'];
|
149 |
|
150 |
if (!supportedFormats.includes(targetFormat)) {
|
151 |
alert('Unsupported target format. Please choose a supported format.');
|
|
|
188 |
const url = URL.createObjectURL(blob);
|
189 |
downloadLink.href = url;
|
190 |
downloadLink.style.display = 'block';
|
191 |
+
}, `image/${targetFormat}`, compressImage ? 0.85 : 1.0); // Explicitly set the MIME type
|
192 |
};
|
193 |
}
|
194 |
}
|