I'm making a favicon.ico
script, and I need to know the max amount of bits possible.
Asked
Active
Viewed 6,062 times
2

ThinkingStiff
- 64,767
- 30
- 146
- 239

horgen
- 2,183
- 10
- 30
- 34
-
3assuming only 1 icon in the .ico ? – jk. Mar 12 '10 at 11:42
-
1The maximum size it will have will be 32x32 pixels. - jk – Camilo Martin Dec 04 '11 at 19:54
3 Answers
4
It maxes out at 32 bits per pixel, 24 RGB plus alpha transparency, so that would be 32 x 32 x 32, or 32768 bits.
So 4096 bytes (4K).

paxdiablo
- 854,327
- 234
- 1,573
- 1,953
-
1Of course, there are also headers, and there could be more than one size/color depth in an icon... – SamB Feb 17 '11 at 17:14
2
In theory, a single ico file can contain up to 65,535 images (see header description). That would mean that the maximum number of pixels could be as large as 65535*32*32, which at 4 bytes per pixel comes to 268,435,456 bytes.

unwind
- 391,730
- 64
- 469
- 606
-
Such a file would be pretty silly, though -- there'd be no basis for the consuming program (app or OS) to prefer any particular image, if they all have the same color depth and size! (Also, headers take space too.) – SamB Feb 17 '11 at 17:16