PNG to ICO (Favicon) Converter
Upload a PNG image to convert it into a multi-resolution ICO (Windows Icon) file, suitable for favicons. Select the desired output sizes.
Image preview will appear here.
Select Output Sizes (pixels):
PDF generation failed. Library not loaded.
'; } return; } const { jsPDF } = window.jspdf; const doc = new jsPDF(); const resultArea = document.getElementById('resultArea'); // Retrieve stored data for PDF const inputFileName = resultArea.dataset.inputFileName || 'N/A'; const outputFileName = resultArea.dataset.outputFileName || 'N/A'; const originalImageDimensions = resultArea.dataset.originalImageDimensions || 'N/A'; const convertedSizes = JSON.parse(resultArea.dataset.convertedSizes || '[]'); const generationDate = new Date().toLocaleString(); let yOffset = 20; // Title doc.setFontSize(24); doc.setTextColor(44, 62, 80); doc.text("PNG to ICO Conversion Summary", 105, yOffset, { align: 'center' }); yOffset += 20; // Summary details doc.setFontSize(14); doc.setTextColor(51, 51, 51); doc.text(`Conversion Date: ${generationDate}`, 20, yOffset); yOffset += 10; doc.text(`Input File: ${inputFileName}`, 20, yOffset); yOffset += 10; doc.text(`Original Dimensions: ${originalImageDimensions}`, 20, yOffset); yOffset += 10; doc.text(`Output ICO File: ${outputFileName}`, 20, yOffset); yOffset += 10; doc.text(`Converted Sizes Included: ${convertedSizes.length > 0 ? convertedSizes.join('x, ') + 'x' : 'None'}`, 20, yOffset); yOffset += 20; // Conversion Notes doc.setFontSize(12); doc.setTextColor(80, 80, 80); doc.text("Important Notes on ICO Conversion:", 20, yOffset); yOffset += 7; const notes = [ "• This tool creates an ICO file containing multiple uncompressed 32-bit (BGRA) images.", "• Each selected size is a separate image embedded within the ICO file.", "• Transparency (alpha channel) from the PNG is preserved using an XOR/AND mask approach for compatibility.", "• For optimal favicon performance and smallest file size, ensure your original PNG has appropriate dimensions and transparent background if desired." ]; notes.forEach(note => { const splitNote = doc.splitTextToSize(note, 170); doc.text(splitNote, 25, yOffset); yOffset += (splitNote.length * 7) + 5; }); yOffset += 15; // Footer doc.setFontSize(9); doc.setTextColor(150, 150, 150); doc.text(`Report Generated by PNG to ICO Converter Tool`, 20, doc.internal.pageSize.height - 15); doc.save("PNG_to_ICO_Conversion_Summary.pdf"); }