On Wed, 17 Oct 2012, Aric Stewart wrote: [...]
The issue I am working on resolving here is that many older windows programs only provide a 64x64 icon. With the old code, because there is no 64x64 slot in icns files, these applications where loosing there icons.
If the Mac behaves sensibly when there's a a single 128x128 icon, then in the case where there's only a 64x64 icon in the source Vincent's suggestion of scaling up would seem to be better.
As far as I know, scaling 64x64 -> 48x48 will produce a somewhat fuzzy-looking icon, more so than scaling down by a factor of two like 64x64 -> 32x32. Similarly, scaling up by a factor of two will produce a blocky icon (assuming you do it by simply replicating pixels) but scaling that back down should produce the same result as starting from the original 64x64 icon. Scaling up by any other factor will produce a very fuzzy icon.
So we have the following scenarios:
Windows Icns file Needed for display Result 64x64 Fuzzy 48x48 32x32 Fuzzy twice 64x64 Fuzzy 48x48 48x48 Fuzzy 64x64 Fuzzy 48x48 64x64 Fuzzy twice 64x64 Fuzzy 48x48 128x128 Fuzzy+Very fuzzy
64x64 Blocky 128x128 32x32 Fuzzy 64x64 Blocky 128x128 48x48 Fuzzy 64x64 Blocky 128x128 64x64 Perfect 64x64 Blocky 128x128 128x128 Blocky
Even if you actually have other sizes in addition to 64x64 I think the upscaling option would actually work pretty well. So it may make sense to change the code to scale up to 128x128 unless there's already a 128x128 icon.