2

I've got a 3-color gif image (#FFFFFF, #3B5AA3, #BE0027).

When I open it as an independent image in GIMP, it renders fine.

But when I open it as layers for another image (or copy the layer from opening it as an image) the colors change (to #EFC52E, #EE6D2A, #EE862B).

What's going on? How can I fix this?

1

The issue is probably caused by the fact that GIF uses indices into a 256 array of colours to specify the colour at each pixel. It's highly unlikely that any two GIF images will share the same colour palette.

So when you open image A it uses it's palette where pixel 1,1 points at index 23 which is blue (for example). Now when you open image B index 23 will use this colour rather than the colour out of its palette (which is red - for example). So image B will look wrong.

If you convert all the images to PNG or some other true colour format you won't get this issue. You can then combine the images and then save back out to GIF if required.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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