Importing a palette from current image adds colors not present in the image.
GIMP version: 2.10.12
Operating System: Windows 10 Pro 1803 (was also present on version 1709)
Package: Installer from gimp.org
Description of the bug
Importing a palette from an image adds colors that are not present. If you do so with the attached file the color 646464 is added to the palette yet is not present in the image. If you take the image and scale it down to 8x8, it will no longer do this.
Reproduction
Is the bug reproducible? Always
Reproduction steps:
- Open file in Gimp
- Right click on Palette list
- Select Import Palette
- Select Image (Sample Merged has no effect, as it should, since the image has just one layer)
- Play with the Number of Colors field and confirm that the palette contains 55 colors when it should contain 54
- Click Import to create the palette
- Open up the palette, undock it, enlarge the window, print screen and Create a new image from clipboard
- Crop the image so that only the palette is present (If there is a way to select a particular color by inputing the hex code and have it be selected in the image, I am not aware of it. If you aren't either, do the following step)
- Use Color Exchange tool to swap color 646464 to something eyecatching so you can notice it change and confirm that it was indeed added to the palette
- Do step 9 for the original file as well to determine that 646464 was not originally present.
…
Expected result: Creating a palette from an image with 54 unique colors results in a palette with 54 unique colors.
Actual result: Creating a palette from an image with 54 unique colors results in a palette with 55 unique colors.
Edited by lillolollo