ICNS to JPG
Nothing you choose here leaves your browser, and nothing is downloaded to make it work — not a library, not a codec, nothing. Apple's icon file holds PNGs, and your browser reads and writes those natively.
The largest picture, flattened onto a background.
A JPEG cannot hold transparency and a Mac icon nearly always has some, so the transparent parts are filled with the colour chosen above rather than left to become black. If the shape matters, PNG is the right target and this one is not.
What an .icns actually is
Four bytes saying icns, the length of the
whole file, and then a run of chunks: four characters of type, a length,
and a picture. Since 2008 those pictures have been ordinary PNGs, which
is the entire reason this page needs nothing downloaded — there is
no Apple-specific compression to implement, just a wrapper to read.
The length of a chunk includes its own eight bytes. That is the one thing to get wrong, and getting it wrong does not produce an error: every chunk after the first starts eight bytes late, the reader finds a type in the middle of a PNG, and it stops early with fewer icons than the file holds. It reports success.
The same size twice is not a mistake
Read a real icon file and two pairs jump out:
| ic09 and ic14 | both 512 pixels across |
|---|---|
| ic08 and ic13 | both 256 pixels across |
Those are the same icon at one and two pixels per point — 512 as a plain 512, and 512 again as the Retina version of 256. macOS picks whichever suits the display. It matters here because a reader that sorts by chunk name gets the sizes in the wrong order, and one that assumes each size appears once throws half the file away. The size is read out of each PNG's own header instead, which is eight bytes of work and never goes out of date when Apple adds a type.
What it will not do
- It will not read the old chunk types. Icon files written before 2008 hold raw or run-length-encoded pixels, and a few hold JPEG 2000, which no browser decodes. Those are counted and named rather than silently skipped, and a file holding nothing else is refused with the reason.
- It will not invent resolution. Scaling a 128-pixel picture up to 1,024 gives you a 1,024-pixel blur, and the page says so before you download it.
- It will not write the icon-mask chunks that very old versions of macOS wanted alongside the pictures. Everything since 10.5 reads the PNG entries.