indexed layers imported onto indexed images retain their own palette.
GIMP version: 2.10.8
Operating System: Windows 10
Description of the bug
When importing a layer into an indexed image by drag and drop, either from another project, or from a file, and the imported layer is also indexed, the imported layer will not adapt to the palette of the image, but will instead, completely invisible to the UI, retain its own palette.
Reproduction
Always reproducible.
Reproduction steps:
- Open an 8-bit image
- Open another 8-bit image, with a vastly different colour palette.
- Drag the layer from the second image into the first project, and drop it on the image.
- Pick a colour from the original palette that is not in the palette of the second image, and use it to paint on the second image.
- Using colour picker, pick a colour from the second image that is not in the palette of the first image, and use it to paint on the second image.
Alternatively, steps 2 and 3 can be replaced by dragging and dropping the second file straight onto the opened first image.
Expected result:
When importing, the new layer should adapt to the palette of the original image.
In both painting cases, the colour matching the closest to the original image's palette should be painted.
Actual result:
When importing, the new layer retains its own palette, and does not change at all.
In both paint cases, the actual painted colour is the closest colour from the image that is being painted on.
Additional information
Painting two lines with two distinct colours, using the Airbrush tool. The green is a colour from the original palette, the light purple is from the added layer's palette. On their respective palettes, both colours have a bunch of close colours that allow nice fades at the edges when painting with them this way.
Painting on original image: green is correct, purple is changed.
Painting on added layer: green is changed, purple is correct. As you can clearly see on this screenshot, the shown image does not at all match the shown palette.