Cap color index values

In the provided example the color table has 10 entries but some of the pixels in the bitmap overflow. This CL goes through the pixel values and caps them to the max index.

An alternate approach would be to just have the color table always have 256 entries but zero out the unused ones.

BUG=492265

Review URL: https://codereview.chromium.org/1165493003
1 file changed