The aforementioned commit introduced some plumbing to allow quantizing to more than 256 colors. However, the guard checks it added to error out if an image is remapped to more than 256 colors incorrectly error out when remapping to exactly 256 colors, as u8::MAX == 255 and 256 > 255.
Fix that by comparing against u8::MAX + 1 instead.
The aforementioned commit introduced some plumbing to allow quantizing to more than 256 colors. However, the guard checks it added to error out if an image is remapped to more than 256 colors incorrectly error out when remapping to exactly 256 colors, as u8::MAX == 255 and 256 > 255.
Fix that by comparing against u8::MAX + 1 instead.