Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This is probably a very easy question, but I am stumped.

I am trying to edit a png. I select a colour with the "Select by color" tool, change the fill colour to red ff0000, or 255,0,0, but when I click the selection to fill, it looks brown.

Other colours also act this way: blue -> purple, yellow -> light brown, etc. White seems to fill correctly.

So, what am I doing wrong? I'm thinking it has to do with the file format or some underlying filter.

share|improve this question

1 Answer 1

up vote 7 down vote accepted

It sounds like the image you are editing is using a limited colour palette rather than full 24-bit RGB. GIMP is doing its best to do what you ask while using colours in the existing palette.

If you want to switch the image to full colour, select Image -> Mode -> RGB from the menus. You should then be able edit the image using any colours you want.

If you need to save the image with an indexed colour palette, you can switch back again by picking the Indexed... menu item from the same menu. This will pop up a dialog box asking what sort of palette you want to use for the image. The default option should suffice.

If you don't need an indexed colour palette, I would just leave the image as RGB. For many of the images people use PNG files for, the savings are small.

share|improve this answer
    
I need to preserve the existing size and format. The only things that may change is the colors. If I edit it with full color, and save it as limited, won't that be the same as editing it with the limited palette? I.e. the colors in the savefile will reverse? –  TLP Sep 19 '11 at 15:06
    
If you choose to automatically create a palette when converting back to indexed, you will likely end up with a different colour palette. Depending on what the requirements are for the image, this may or may not be acceptable. Since the image format is compressed, it is unlikely that you'll end up with a file of exactly the same size either way. –  James Henstridge Sep 20 '11 at 0:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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