Indexization using a custom palette doesn't quantize accurately
Submitted by david gowers
Steps to reproduce:
- Create a new RGB image of 256x256 pixels
- Generate a grayscale sinus pattern onto it using filters->render->patterns->sinus
- Check the number of colors using Colorcube Analysis(255)
- Palette map the image using the attached palette of 192 colors.
- Check the number of colors (190)
- Indexize to the attached palette.
- Check the number of colors (101)
In this case, 90% of the colors in the non-indexized picture aren't being used despite all of the colors in the picture matching palette entries exactly.
Compare with this: (starting after step 5) 6. Indexize the image to 256 colors, optimal palette 7. Check the number of colors (still 190)
See the attachments.