2

I have an indexed image with multiple instances of the same color in the palette. For example, I have #00FF21 color on indexes 3, 11, 27 and 40.

I'd like to apply certain indexed color (e.g. 27) to some pixels on my image. I pick 27th color from the palette as a foreground color and then use pencil to paint pixels.

Everything seems to be OK, but when I check the newly colored pixels with eye-dropper tool, I see that they have index 3, not 27.

It looks like GIMP ignores the chosen index, so the first index occurrence is applied.

Is it a bug? Or am I doing something wrong?

Here's the example video.

4
  • 1
    Hi. Welcome to GDSE. I can't replicate this problem. When I paint on an indexed image, in one colour from the Indexed palette, then sample it with the eyedropper, it takes on that colour, and changes accordingly in the Palette Editor. All I can think of is to make sure the Eye Dropper has "Sample Merged" checked in the Tool Options.
    – Billy Kerr
    May 2, 2021 at 18:08
  • @BillyKerr thanks for your reply. I've added the link to the example video, And yes, eye dropper tool has "Sample Merged enabled.
    – SagRU
    May 3, 2021 at 15:00
  • I think it's probably because the black colours are exactly the same. Why do you have multiple instances of the same colour? What's the purpose? What are you actually trying to achieve here?
    – Billy Kerr
    May 3, 2021 at 15:19
  • Well, my image is taken from the old DOS programme. Developers used certain color indexes for animation. I'd like to edit some animations, so I have to use certain color indexes. As shown in the example video, I need to replace black color on index 0 with black color on index 143 for some pixels.
    – SagRU
    May 3, 2021 at 17:12

1 Answer 1

1

When you paint, Gimp doesn't know where the color you use comes from, it just tries to match that color to the best match in the colormap.

If you don't need to have several entries of the colormap for the same color, you can remove them using Image ➤ Mode ➤ RGB followed by Image ➤ Mode ➤ Indexed (asking for Optimum palette and a max of 256 colors). This will recreate a colormap with no duplicate entries.

If you need the duplicate entries, then alter slightly one of the entries in the colormap, edit your image, and reset that entry to its initial values when done with the editing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.