Implements #8251
@jonasschnelli I’m not sure what tooling you used in 4c23743, but for some reason icotool, even though I’ve used the same sizes/bit depths as you, manages to produce a huge icon file:
0 57964 Feb 18 2015 bitcoin.ico
1 295606 Jun 29 13:01 bitcoin_testnet.ico
0$ icotool -l bitcoin.ico > /tmp/bitcoin.lst
1bitcoin.ico: clr_important field in bitmap should be zero
2bitcoin.ico: clr_important field in bitmap should be zero
3bitcoin.ico: clr_important field in bitmap should be zero
4$ icotool -l bitcoin_testnet.ico > /tmp/bitcoin_testnet.lst
5$ diff -du /tmp/bitcoin.lst /tmp/bitcoin_testnet.lst
6[no output]
7$ cat /tmp/bitcoin.lst
8--icon --index=1 --width=48 --height=48 --bit-depth=4 --palette-size=16
9--icon --index=2 --width=32 --height=32 --bit-depth=4 --palette-size=16
10--icon --index=3 --width=16 --height=16 --bit-depth=4 --palette-size=16
11--icon --index=4 --width=48 --height=48 --bit-depth=8 --palette-size=256
12--icon --index=5 --width=32 --height=32 --bit-depth=8 --palette-size=256
13--icon --index=6 --width=16 --height=16 --bit-depth=8 --palette-size=256
14--icon --index=7 --width=256 --height=256 --bit-depth=32 --palette-size=0
15--icon --index=8 --width=48 --height=48 --bit-depth=32 --palette-size=0
16--icon --index=9 --width=32 --height=32 --bit-depth=32 --palette-size=0
17--icon --index=10 --width=16 --height=16 --bit-depth=32 --palette-size=0
Comparing binary, it looks like it’s not using PNG compression inside the icon.
It also looks like it’s picking a smaller and lower-depth icon than it should.