oldfart commited on
Commit
e5a9508
1 Parent(s): bb6d04b

Update index.html

Browse files
Files changed (1) hide show
  1. 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="image/bmp">BMP</option>
84
- <option value="image/eps">EPS</option>
85
- <option value="image/gif">GIF</option>
86
- <option value="image/ico">ICO</option>
87
- <option value="image/jpeg">JPG</option>
88
- <option value="image/png">PNG</option>
89
- <option value="image/psd">PSD</option>
90
- <option value="image/svg+xml">SVG</option>
91
- <option value="image/tga">TGA</option>
92
- <option value="image/tiff">TIFF</option>
93
- <option value="image/webp">WebP</option>
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 = ['image/bmp', 'image/eps', 'image/gif', 'image/ico', 'image/jpeg', 'image/png', 'image/psd', 'image/svg+xml', 'image/tga', 'image/tiff', 'image/webp'];
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, compressImage ? 0.85 : 1.0); // Adjust compression quality if needed
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
  }