Update index.html
Browse files79 unmodified lines808182838485868788899091929394959648 unmodified lines14514614714814915015136 unmodified lines18818919019119219319479 unmodified lines<label for="targetFormat">Choose Target Format:</label><select id="targetFormat" required><option value="image/bmp">BMP</option><option value="image/eps">EPS</option><option value="image/gif">GIF</option><option value="image/ico">ICO</option><option value="image/jpeg">JPG</option><option value="image/png">PNG</option><option value="image/psd">PSD</option><option value="image/svg+xml">SVG</option><option value="image/tga">TGA</option><option value="image/tiff">TIFF</option><option value="image/webp">WebP</option></select><label for="customWidth">Custom Width (leave empty for original):</label>48 unmodified linesformatDisplay.textContent = file.type;// Check if the target format is supportedconst supportedFormats = ['image/bmp', 'image/eps', 'image/gif', 'image/ico', 'image/jpeg', 'image/png', 'image/psd', 'image/svg+xml', 'image/tga', 'image/tiff', 'image/webp'];if (!supportedFormats.includes(targetFormat)) {alert('Unsupported target format. Please choose a supported format.');36 unmodified linesconst url = URL.createObjectURL(blob);downloadLink.href = url;downloadLink.style.display = 'block';}, targetFormat, compressImage ? 0.85 : 1.0); // Adjust compression quality if needed};}}79 unmodified lines808182838485868788899091929394959648 unmodified lines14514614714814915015136 unmodified lines18818919019119219319479 unmodified lines<label for="targetFormat">Choose Target Format:</label><select id="targetFormat" required><option value="bmp">BMP</option><option value="eps">EPS</option><option value="gif">GIF</option><option value="ico">ICO</option><option value="jpeg">JPG</option><option value="png">PNG</option><option value="psd">PSD</option><option value="svg+xml">SVG</option><option value="tga">TGA</option><option value="tiff">TIFF</option><option value="webp">WebP</option></select><label for="customWidth">Custom Width (leave empty for original):</label>48 unmodified linesformatDisplay.textContent = file.type;// Check if the target format is supportedconst supportedFormats = ['bmp', 'eps', 'gif', 'ico', 'jpeg', 'png', 'psd', 'svg+xml', 'tga', 'tiff', 'webp'];if (!supportedFormats.includes(targetFormat)) {alert('Unsupported target format. Please choose a supported format.');36 unmodified linesconst url = URL.createObjectURL(blob);downloadLink.href = url;downloadLink.style.display = 'block';}, `image/${targetFormat}`, compressImage ? 0.85 : 1.0); // Explicitly set the MIME type};}}
index.html+13-13