ICON-key was never used in icns files (only in Resource Forks).it32 keys have a header of four zero-bytes, without exception.name key can hold three different values:
¹ The analysis-results-table includes both, actual icns files and Resource Fork icons.
You can query the database manually to see specifics (fake=0).
Note: the key column stores binary keys.
If you want to query a specific key, use the proper notation (e.g., x'69636c38' for “icl8”).
.icns OR in .app bundles, but not both (icsb, icp6)..app bundle.ic04 and ic05 can be “fixed” by including a transparency mask (s8mk and l8mk respectively).
Technically, the last field is ignored.
For the mentioned fix, the alpha mask is ignored (and ARGB already includes transparency).
This may be an issue for other cases though.
E.g. when adding both (ic04 + ic05) the latter is ignored and not displayed in icns.ic05 is 32@1x, not 16@2x.ic06 key. Tested all sizes on 10.12 and 15 (both, app and icns)..icns files.
Neither is there a Preview app to view icns files, nor has is support for .app bundles.
PowerPC apps can include icons (via Resource Forks) but I couldn’t find a quick-fix to apply a custom icon to a given app.Curiously, on my local machine (macOS 15) I cannot render jp2 images, only jpf.
But when tested in a macOS 15 VM, jp2 icons rendered fine.
I do not know why this issue exists (or whether it may affect other machines).
is32, il32, ih32, it32) should always set an alpha mask (s8mk, l8mk, h8mk, t8mk).
If no mask is set, the behavior is undefined.
MacOS 10.9 – 26 show an opaque artwork for .app but a transparent artwork for .icns files.
MacOS 10.8 and earlier displays no icon for either..app only).
Additionally, if the last value is a repeating value, up to 130 copies would be ignored.
This test shows, that the issue is prevelent on macOS 12 – 26.
However, in my initial test in 2018, I stumbled upon this issue on a macOS 11 machine.
Given that my macOS 11 VM was emulated (Intel), I assume this is an ARM issue.compression-w-fix-test shows that adding one NULL byte can fix the compression issue – and is displayed correctly in all supported OS versions.retina test results are inconclusive because all VMs were used without Retina display support.
@2x images (qlmanage with flag -f 2) show the proper icon since 10.7.
But that is expected, since only ic10, ic11, ic12, ic13, ic14 fields are used (which are supported).@1x images show a red color (expected, non-retina test color)..app icons could not be tested because of the non-Retina display (all icons are red).@2x icon is displayed if no @1x icon exists (with smearing colors).retina-other test tries to resolve these uncertainties.
.app and .icns combined.
Isolated, the ARGB fields (ic04, ic05) can only be shown in .app but not in .icns.
Equaly, the PNG fields (ic11, ic12) can only be shown in .icns but not in .app.
When comined, the Finder preview will load the @2x version (PNG) and apps will fallback to the @1x version (ARGB) on non-retina displays.icsb (@1x ARGB).
The @1x variant cannot be displayed in Finder for .icns files until macOS 15.
Whereas .app icons can be displayed since macOS 10.7 for the same field.
The @2x variant, icsB (PNG), will display fine for .icns files when used as the only key.
But when combined with the @1x variant, the .icns preview will break on non-Retina screens.All 24-bit RGB fields can also hold uncompressed ARGB data.
The data must be interleaved (ARGBARGB) without any header (neither it32 header, nor “ARGB” header).
The alpha channel of the uncompressed data is ignored and shall be combined with one of the bitmask fields (s8mk, l8mk, h8mk, t8mk).
Presumably the (fixed) data length determines whether to parse as uncompressed ARGB or as compressed RGB data.
NOTE: uncompressed RGB data is not supported!
(thanks @toy for finding this)
Even though there is still support for rendering uncompressed RGB data, I strongly discourage you against it.
You can see in the table below how unstable that support is.
E.g. 10.4 crashes if uncompressed data is used on unsupported fields (e.g. ic07 as app icon).
10.6 – 10.8 were the only OS which could render the alpha mask of the RGB data itself (H).
Legend:
| Key | 10.0 | 10.1 | 10.2 | 10.3 | 10.4 | 10.5 | 10.6 | 10.7 | 10.8 | 10.9 | 10.10 | 10.11 | 10.12 | 10.13 | 10.14 | 10.15 | 11 | 12 | 13 | 14 | 15 | 26 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| is32 | ? | S# | -S | -S | -S | -S | -S | -S | -S | -S | -S | -S | -S | -S | -S | |||||||
| is32+mask | T | T | T | T | -T | ? | T | T | T | T | T | T | T | T | -T | -T | T | T | T | T | T | T |
| il32 | ? | S# | -S | -S | -S | -S | -S | -S | -S | -S | -S | -S | -S | -S | -S | |||||||
| il32+mask | T | T | T | T | -T | ? | T | T | T | T | T | T | T | T | -T | -T | T | T | T | T | T | T |
| ih32 | ? | S# | -S | -S | -S | -S | -S | -S | -S | -S | -S | -S | -S | -S | -S | |||||||
| ih32+mask | T | T | T | T | -T | ? | T | T | T | T | T | T | T | T | -T | -T | T | T | T | T | T | T |
| it32 | ? | -S | -S | -S | -S | -S | -S | -S | -S | -S | -S | -S | -S | -S | ||||||||
| it32+mask | T | T | T | T | -T | ? | -T | T | T | T | T | T | T | T | -T | -T | T | T | T | T | T | T |
| icp4 | ? | -H | -S | -S | -S | -S | -S | -S | -S | -S | -S | -S | -S | -S | -S | |||||||
| icp4+mask | ? | -H | T | T | T | T | T | T | T | -T | -T | T | T | T | T | T | T | |||||
| icp5 | ? | -H | -S | -S | -S | -S | -S | -S | -S | -S | -S | -S | -S | -S | -S | |||||||
| icp5+mask | ? | -H | T | T | T | T | T | T | T | -T | -T | T | T | T | T | T | T | |||||
| icp6 | ? | -H | -H | -H | ||||||||||||||||||
| icp6+mask | ? | -H | -H | -H | ||||||||||||||||||
| icsb | ? | -H | -H | |||||||||||||||||||
| ic05 | ? | -H | -H | |||||||||||||||||||
| ic05+mask | ? | -H | -H |
Note: I couldn’t test 10.5 because my VM wouldn’t start.