Skip to content
jtippet edited this page Mar 23, 2019 · 1 revision

ICO230: IndexedColorOutOfBounds

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.

Then, each pixel is specified as an index into that color table. So for example, if the color table is:

  • 0 = Red
  • 1 = Pink
  • 2 = Yellow then you can draw a pink pixel by putting the value 1 in the pixel's spot.

You will receive warning ICO230 if some pixel refers to a color index that is bigger than the whole table. Continuing the above example, you would receive this warning if some pixel asked for color 3 or 4 or anything larger than the largest color value, 2.

Clone this wiki locally