-
Notifications
You must be signed in to change notification settings - Fork 1
ICO231
ICO files can contain bitmap files. If the bitmap has a color depth of 8 bits or fewer, then the bitmap is stored using indices into a color table. The size of the color table is provided in the BITMAPINFOHEADER::biClrUsed field. The color table can have any number of colors in it, up to the image's color depth. For example, an image with 4-bit color can have up to 16 colors in the color table, because 2^4 = 16.
Not all images will need to use the maximum number of colors that the color depth permits. For example, an image might only have 13 distinct colors; then it's possible to emit the icon as a 4-bit image with only 13 entries in its color table. However, this ICO file will not be compatible with all image-processing software. Some graphics libraries refuse to process images that don't have a maximum-sized color table, i.e., a table with a size equal to 2^bitdepth.
Therefore, IcoTools emits warning ICO230 if the color table is smaller than the maximum allowed size, to alert you to potential compatibility issues.
By default, when the IcoTools suite creates an indexed bitmap, it pads out the color table with (unused) black color values until the color table is at is maximum size. But IcoCrush will emit icons with the smallest possible color tables if you use the --allow-truncated-palette option.