sample-ico-favicon-multi-res-16-32-48.ico
Dimensions:16×16, 32×32, 48×48
4.9 KB
ICO Download ICO sampleICO · 5 ICO sample files available
Download free ICO sample files including multi-resolution web favicons, Windows desktop application icon suites, high-DPI retina assets, and classic DIB icons.
ICO test suite
5 ICO sample files available
sample-ico-favicon-multi-res-16-32-48.ico
Dimensions:16×16, 32×32, 48×48
4.9 KB
ICO Download ICO samplesample-ico-app-complete-16-to-256.ico
Dimensions:16×16 to 256×256
20.3 KB
ICO Download ICO samplesample-ico-high-res-256x256.ico
Dimensions:256×256
10 KB
ICO Download ICO samplesample-ico-standard-32x32.ico
Dimensions:32×32
1.4 KB
ICO Download ICO samplesample-ico-classic-dib-32x32.ico
Dimensions:32×32
4.2 KB
ICO Download ICO sampleTechnical specification & guide
The Microsoft Windows Icon format (.ico) is an image container specifically engineered to bundle multiple raster bitmap and compressed PNG images at various resolutions, bit depths, and color palettes into a single physical file. First introduced in Windows 1.0 (1985) and later adopted as the universal web favicon standard by Internet Explorer 5 in 1999, ICO remains the foundational standard for desktop shell iconography and web browser bookmark identity.
Introduced in 1985 with Microsoft Windows 1.0, the ICO format originally encapsulated fixed-size monochrome bitmaps (1-bit, 32×32 pixels). As Windows evolved through versions 3.0 and 95, color palettes expanded to 16 colors (4-bit EGA) and 256 colors (8-bit VGA), adding separate 1-bit boolean transparency AND masks alongside XOR color pixel matrices.
With Windows XP in 2001, Microsoft introduced 32-bit RGBA icons incorporating an 8-bit true alpha channel (256 levels of smooth drop shadows and anti-aliasing) packaged within Device-Independent Bitmap (DIB) structures.
Windows Vista (2006) brought the most significant architectural modernization to date: the inclusion of raw PNG bitstream compression inside the ICO container for 256×256 pixel high-DPI assets. This reduced file footprints from several megabytes down to tens of kilobytes while maintaining backward compatibility with legacy DIB sub-images.
On the web, Microsoft Internet Explorer 5 (March 1999) introduced the /favicon.ico convention in the server webroot. Standardized by the W3C and WHATWG, web browsers worldwide automatically request /favicon.ico and query linked icon files to populate browser tabs, bookmarks, reading lists, and mobile home screen tiles.
An ICO file commences with a 6-byte file header (ICONDIR): two reserved zero bytes (0x0000), a 2-byte type specifier (0x0001 for ICO, 0x0002 for cursor .cur), and a 2-byte integer specifying the total number of sub-images (idCount) packed in the file.
Immediately following the header is a contiguous array of 16-byte directory entries (ICONDIRENTRY). Each entry specifies image width (1 byte; 0 represents 256 px), image height (1 byte; 0 represents 256 px), color count (1 byte; 0 if >= 8bpp), reserved byte (0x00), color planes (2 bytes, usually 1), bits per pixel (2 bytes, e.g. 32 for RGBA), total byte size of the image payload (4 bytes), and absolute byte offset from the start of the file (4 bytes).
Image payloads follow two distinct binary formats: legacy Device-Independent Bitmaps (DIB) or modern PNG streams. In DIB-encoded icons, the sub-image begins with a 40-byte BITMAPINFOHEADER where the declared biHeight is strictly double the visual height (height * 2) to accommodate both the XOR color pixel array and the trailing 1-bit AND transparency mask.
In PNG-encoded icons (standardized since Windows Vista), the payload begins with the standard 8-byte PNG signature (0x89 0x50 0x4E 0x47 0x0D 0x0A 0x1A 0x0A), followed by standard IHDR, IDAT, and IEND chunks. This enables high-efficiency Deflate compression for 256×256, 128×128, and 64×64 icons.
Multi-Resolution Packaging: A single .ico file packages icons tailored for 16×16 (browser tab / taskbar small), 32×32 (desktop icon / file explorer standard), 48×48 (Windows explorer large), 64×64 (high-DPI tiles), and 256×256 (retina / jumbo explorer view), allowing operating systems to pick pixel-perfect hand-hinted assets rather than scaling blurry bitmaps.
True 8-Bit Alpha Transparency: 32-bit RGBA icons support 256 levels of alpha opacity, enabling soft realistic drop shadows, edge feathering, and seamless rendering over any light, dark, or textured operating system wallpaper.
Universal Browser Fallback: Every graphical web browser from 1999 to the present day parses /favicon.ico natively without requiring explicit HTML <link> tags or JavaScript loaders, making it an essential baseline for web deployment.
Hybrid Compression Engine: Combines ultra-fast uncompressed DIB decoding for microscopic resolutions (16×16 and 32×32) where memory layout matches hardware blitting with PNG Deflate compression for larger resolutions to keep payload sizes minimal.
Microsoft Windows: Native support across Windows 1.0, 95, 98, 2000, XP, Vista, 7, 8, 10, 11, and Windows Server for desktop shortcuts, executable resources (.exe, .dll), and window title bars.
Web Browsers: Universal support across Google Chrome, Mozilla Firefox, Apple Safari, Microsoft Edge, Opera, and legacy Internet Explorer for browser tabs, address bars, bookmarks, and PWA manifests.
Graphic Software: Adobe Photoshop (via ICOFormat plugin or exporter scripts), GIMP (full native reading and writing of multi-layer ICO), Inkscape, ImageMagick, IcoFX, and Axialis IconWorkshop.
Development Environments & Runtimes: Native compilation support in Visual Studio (.rc resource files), Electron, Node.js (sharp, png-to-ico), Python (Pillow), Go, Rust, and .NET System.Drawing.Icon.
Compare how Microsoft ICO container properties contrast with standalone raster formats, vector graphics, and Windows cursor files across web and desktop workflows.
| Technical characteristic | ICO (Icon Container) | PNG (Portable Network) | SVG (Vector Graphics) | WebP (Modern Raster) | CUR (Windows Cursor) | Operational considerations |
|---|---|---|---|---|---|---|
| Container Type | Multi-image container (DIB/PNG) | Single image raster stream | XML vector document | Single/multi RIFF raster | Single/multi cursor container | ICO and CUR uniquely bundle multiple distinct resolutions in one file. |
| Resolution Support | Multiple fixed sizes (16 to 256 px) | Single fixed dimension | Infinitely scalable resolution | Single fixed dimension | Multiple fixed sizes (16 to 128 px) | SVG scales mathematically, while ICO preserves hand-drawn pixel clarity at 16×16. |
| Hotspot Coordinate | None (image anchor centered) | None (not applicable) | None (not applicable) | None (not applicable) | X/Y Hotspot (2 bytes each) | CUR is identical to ICO binary layout except type=2 and planes/bits store hotspot coords. |
| Compression Scheme | Hybrid (Raw DIB + PNG Deflate) | Deflate (ZLIB lossless) | Plain text / Gzip (SVGZ) | VP8 / VP8L lossless & lossy | Raw DIB or PNG stream | ICO leverages PNG compression for frames >= 256×256 since Windows Vista. |
| Browser Auto-Fetch | Yes (automatic /favicon.ico) | Requires <link rel="icon"> | Requires <link rel="icon"> | Requires <link rel="icon"> | Used via CSS cursor property | Browsers make an implicit HTTP GET to /favicon.ico without HTML configuration. |
| Color & Alpha Support | 1-bit, 4-bit, 8-bit, 32-bit RGBA | Truecolor 24-bit + 8/16-bit alpha | Full CSS / sRGB / P3 colorspace | 24-bit RGB + 8-bit alpha | 1-bit mask or 32-bit RGBA alpha | Both ICO and PNG support smooth 256-level translucent drop shadows. |
Reference production code snippets to declare multi-resolution favicons in HTML, generate ICO files in Node.js using sharp, export icons with Python Pillow, and batch-compile using ImageMagick CLI.
HTML5 Favicon & Web Manifest Declaration:
<!-- Standard HTML5 Favicon & Web Manifest Declaration -->
<!-- 1. Universal legacy fallback (IE5-11, older crawlers, default browser requests) -->
<link rel="shortcut icon" href="/favicon.ico" sizes="16x16 32x32 48x48">
<!-- 2. Modern high-resolution PNG icons for modern browser tabs -->
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<!-- 3. Scalable vector icon with dark-mode media query support -->
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
<!-- 4. Apple Touch Icon for iOS home screen bookmarks -->
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<!-- 5. Web App Manifest for Android Chrome & PWA installation -->
<link rel="manifest" href="/site.webmanifest">Node.js (Sharp & png-to-ico Packaging):
// Node.js: Pack multiple PNG buffers into an ICO file using png-to-ico
import { readFileSync, writeFileSync } from 'node:fs';
import pngToIco from 'png-to-ico';
import sharp from 'sharp';
async function generateMultiResIco(masterSvgPath, outputPath) {
const sizes = [16, 32, 48, 64, 128, 256];
const pngBuffers = [];
for (const size of sizes) {
const buf = await sharp(masterSvgPath)
.resize(size, size, { fit: 'contain', background: { r: 0, g: 0, b: 0, alpha: 0 } })
.png({ compressionLevel: 9 })
.toBuffer();
pngBuffers.push(buf);
}
const icoBuffer = await pngToIco(pngBuffers);
writeFileSync(outputPath, icoBuffer);
console.log(`Generated ICO: ${outputPath} (${icoBuffer.length} bytes, 6 resolutions)`);
}Python (Pillow Multi-Resolution Export):
# Python: Generate a multi-resolution ICO file using Pillow (PIL)
from PIL import Image
def create_ico(source_image_path, output_ico_path):
# Open high-resolution master image (e.g. 512x512 PNG or SVG raster)
img = Image.open(source_image_path).convert("RGBA")
# Standard multi-resolution icon sizes for Windows & Web
icon_sizes = [(16, 16), (24, 24), (32, 32), (48, 48), (64, 64), (128, 128), (256, 256)]
# Pillow embeds PNG compression automatically for 256x256 sub-images
img.save(
output_ico_path,
format='ICO',
sizes=icon_sizes
)
print(f"Saved multi-resolution ICO to {output_ico_path} with {len(icon_sizes)} sizes.")
create_ico("master-logo.png", "favicon.ico")ImageMagick CLI (Multi-Res ICO Compilation):
# ImageMagick CLI: Combine multiple PNG resolutions into a single ICO file
# 1. Generate individual square PNG frames from vector master
magick master.svg -resize 16x16 icon-16.png
magick master.svg -resize 32x32 icon-32.png
magick master.svg -resize 48x48 icon-48.png
magick master.svg -resize 256x256 icon-256.png
# 2. Package all frames into a single multi-resolution ICO container
magick convert icon-16.png icon-32.png icon-48.png icon-256.png favicon.ico
# 3. Inspect internal frames and color depths using identify
identify favicon.icoKey technical parameters, magic bytes, structure headers, and color encoding standards governing the Microsoft Windows ICO file format.
An ICO file is an image container specifically designed by Microsoft to hold multiple versions of an icon at different resolutions and color depths within a single file. For example, a single favicon.ico can package 16×16 px for browser tabs, 32×32 px for desktop shortcuts, 48×48 px for file dialogs, and 256×256 px for high-DPI retina displays. By packaging pre-rendered, hand-hinted icons at specific resolutions, operating systems and browsers avoid dynamic pixel interpolation, ensuring crisp edges, sharp lines, and pixel-perfect clarity at any display scale.
Classic ICO files encode icon frames as Device-Independent Bitmaps (DIB), which consist of a 40-byte BITMAPINFOHEADER, an uncompressed XOR color pixel matrix, and a 1-bit boolean AND transparency mask. While efficient for tiny 16×16 and 32×32 icons, uncompressed 256×256 32-bit DIB icons consume 262 KB per frame. Starting in Windows Vista (2006), Microsoft updated the ICO specification to permit raw, Deflate-compressed PNG bitstreams inside the container. PNG compression reduces a 256×256 icon from 262 KB down to 10–20 KB while preserving full 8-bit alpha transparency.
Modern websites should use both. While modern evergreen browsers support SVG and PNG icons via `<link rel="icon" type="image/svg+xml">` and `<link rel="icon" type="image/png">`, thousands of legacy enterprise browsers, RSS readers, bookmark aggregators, web crawlers, search engine indexers, and automated API clients make an implicit HTTP GET request directly to `/favicon.ico` in the web root. Having a multi-resolution `favicon.ico` containing 16×16, 32×32, and 48×48 pixel frames prevents server 404 errors and guarantees 100% universal display fallback.
When Windows renders an icon (such as on the desktop, file explorer, or taskbar), the shell querying engine calculates the exact physical pixel dimensions required for the current DPI scaling level (e.g. 100%, 125%, 150%, or 200%). It iterates through the ICONDIRENTRY table in the ICO container to locate an exact match. If an exact resolution match is found, Windows blits it directly. If no exact match exists, Windows chooses the closest higher-resolution frame and downsamples it with bicubic filtering to preserve sharpness, rather than upscaling a smaller frame.
ICO and CUR share an almost identical binary layout, with two critical differences: First, byte 2 of the 6-byte header specifies the file type—0x0001 for ICO and 0x0002 for CUR. Second, in the 16-byte directory entry, bytes 4–7 represent color planes (2 bytes) and bits-per-pixel (2 bytes) in an ICO file, whereas in a CUR file, those exact 4 bytes represent the X-coordinate hotspot (2 bytes) and Y-coordinate hotspot (2 bytes). The hotspot defines the exact pixel coordinate where mouse clicks register.