Što je ICO?

Format ikona za Windows aplikacije i web favicon

ICO je format datoteka ikona koji je Microsoft razvio za Windows operativni sustav. Koristi se za pohranu ikona aplikacija, ikona vrsta datoteka i web favicon-a.

Jedinstvena značajka ICO datoteka je mogućnost pohrane više slika različitih veličina i dubina boja u jednoj datoteci. To omogućuje operativnom sustavu odabir najprikladnije verzije za kontekst.

U web razvoju ICO je dugo bio standard za favicon — malu ikonu koja se prikazuje u kartici preglednika. Iako moderni preglednici podržavaju PNG i SVG za favicon, ICO ostaje popularan za široku kompatibilnost.

Every ICO file starts with a 6-byte ICONDIR header. The first 4 bytes are always 00 00 01 00 — two reserved zero bytes, then 01 00 identifying the file as an icon (cursor files use 02 00 instead). Bytes 5-6 store the number of images in the file as a little-endian 16-bit integer. A favicon with 4 sizes (16x16, 32x32, 48x48, 256x256) would have 04 00 here.

After the ICONDIR header, each image gets a 16-byte ICONDIRENTRY describing it. The first byte is width (0 means 256), second is height (also 0 for 256), third is the color palette count (0 for 256+ colors). Then there's a reserved byte, followed by color planes (2 bytes), bits per pixel (2 bytes), image data size (4 bytes), and the offset to the actual image data within the file (4 bytes). This directory structure lets software jump directly to the size it needs.

For images smaller than 256x256, ICO traditionally stores them as BMP data — but with a twist. The data skips the 14-byte BITMAPFILEHEADER that normal BMP files have, starting directly with the BITMAPINFOHEADER. The biHeight field is doubled (e.g., 64 instead of 32 for a 32x32 icon) because it includes both the XOR mask (the actual image) and the AND mask (a 1-bit transparency mask). This BMP-without-header approach dates back to Windows 3.0.

Starting with Windows Vista, ICO files can embed raw PNG data for the 256x256 size. The format detector checks the first 8 bytes of each image's data: if they match the PNG signature (89 50 4E 47 0D 0A 1A 0A), the data is treated as a complete PNG file. This keeps large icon sizes compressed — a 256x256 32-bit BMP would be about 264KB uncompressed, while the PNG version is typically 10-30KB.

Tehničke specifikacije

Puni naziv ICO file format (Windows Icon)
Ekstenzije .ico
MIME tip image/x-icon
Vrsta slike Rasterska (višestruke veličine)
Dubina boja Do 32-bit (s alfa kanalom)
Prozirnost Da
Animacija Ne
Maksimalne dimenzije 256×256 piksela
Godina izdavanja 1985
Year released 1985

Kada koristiti ICO

  • Izrada ikona za Windows aplikacije
  • Web favicon za široku kompatibilnost
  • Windows prečaci na radnoj površini
  • Ikone asocijacija vrsta datoteka
  • Kompatibilnost sa starijim preglednicima

Prednosti i nedostaci

Prednosti

  • Pohranjuje više veličina u jednoj datoteci
  • Univerzalna podrška u Windows ekosustavu
  • Radi kao favicon u svim preglednicima
  • Podržava prozirnost
  • Male datoteke

Nedostaci

  • Ograničen na 256×256 piksela
  • SVG favicon je bolji za moderni web
  • Nije pogodan za fotografije
  • Ograničena podrška na macOS i Linux
  • Ne podržava vektorsko skaliranje

Kompatibilnost

ICO datoteke rade na svim verzijama Windowsa i u svim preglednicima kao favicon. macOS Preview i većina editora slika mogu otvoriti ICO. GIMP, IrfanView i ImageMagick rade s ICO formatom.

ICO u usporedbi s drugim formatima

ICO i PNG
PNG pohranjuje jednu sliku, ICO sadrži više veličina. Za moderne favicon PNG je dovoljan, ali ICO osigurava kompatibilnost sa starijim preglednicima.
ICO i SVG
SVG je vektor — savršen na svakoj veličini. ICO je raster ograničen na 256×256. Moderne web stranice koriste SVG favicon, ali ICO je još uvijek potreban za široku kompatibilnost.
ICO vs ICNS
ICNS is Apple's equivalent icon format for macOS, supporting higher resolutions up to 1024 by 1024 pixels. ICO is limited to 256 pixels but dominates on Windows and the web. Cross-platform applications typically need both formats for full operating system integration.

ICO alati na My File Tool

Pretvorite ICO datoteke u PNG ili druge formate. Bez instalacije. Prva datoteka besplatna.

Često postavljana pitanja

Kako otvoriti ICO datoteku?
Windows prikazuje ICO izravno. Na macOS koristite Preview. Također GIMP, IrfanView ili prenesite na My File Tool.
ICO ili PNG za favicon?
Za najširu kompatibilnost koristite ICO. Moderni preglednici podržavaju PNG favicon, ali neki stariji zahtijevaju ICO.
Kako napraviti ICO datoteku?
Pretvorite PNG sliku u ICO pomoću My File Tool. Ili koristite GIMP, Photoshop ili online ICO generatore.
Kako pretvoriti ICO u PNG?
Prenesite ICO na My File Tool i odaberite PNG. Prva datoteka je besplatna.
What is the maximum size for an ICO image?
Each individual image within an ICO file can be up to 256 by 256 pixels. For larger icon needs, Windows uses PNG files directly. The 256x256 size within ICO files typically uses PNG compression internally.
What is the minimum valid ICO file structure?
The smallest valid ICO file needs a 6-byte ICONDIR header (00 00 01 00 01 00), one 16-byte ICONDIRENTRY, and the image data itself. For a 1x1 pixel 32-bit icon using BMP format, that's 6 + 16 + 40 (BITMAPINFOHEADER) + 4 (1 pixel BGRA) + 4 (AND mask row padded to 4 bytes) = 70 bytes total. In practice, a usable 16x16 favicon with PNG compression is around 200-400 bytes.
How does ICO store transparency?
ICO uses two methods. For BMP-based icons, there's a 1-bit AND mask that defines which pixels are transparent. For 32-bit BMP icons, the alpha channel in BGRA pixel data provides smooth per-pixel transparency. PNG-embedded icons (256x256) use PNG's native alpha channel. Modern icons should use 32-bit color with alpha for the best results.
Can an ICO file contain PNG images?
Yes. Since Windows Vista, ICO files can store images as embedded PNG data instead of BMP. This is standard practice for the 256x256 size, where PNG compression reduces a 260KB uncompressed bitmap to 10-30KB. The format is auto-detected by checking if the image data starts with the PNG magic bytes (89 50 4E 47).

Trebate pretvoriti ICO?

Pretvorite ICO datoteke u PNG ili druge formate u nekoliko sekundi.

Pretvori ICO odmah