Don't select too many colors.

In the unlikely (probably impossible) event that an image has >=2^32-1
pixels for more colors than we expect.