Changing colours in Gimp 2.10

0

I have been supplied a logo sitting on a white background. It is all one layer. I want to change the logo so that it has a transparent background.
It is not possible to go back to the person who created this in the first place.

If I set the alpha colour to white ALL the colours in the logo become at least partly transparent so when I drop it onto a dark background this shows through the image and changes the colours.

How do I achieve the effect I want?

OonaghG

Posted 2018-06-05T21:55:04.400

Reputation: 1

Answers

1

Do a wand/fuzzy select on the background(*), then Select>Grow by one or two pixels (one if the image is very clean, two if it's a bit dirty (JPEG artefacts...)), so that the selection includes the edge pixels. You can then do Color-to-alpha without any change to the body of the logo.

Alternatively, use the ofn-erase-background script (which is mostly the procedure above).

(*) The difference between the wand and the color selector is that the wand will only select pixels in the background, and not pixels inside the logo body that you want to keep even though they have the color of the background. On the other hand with the wand you would have to shift-click inside holes/letter loops (A, B, O...) to include them in the selection, when the color selctor would have selected them automatically. TLDR: with the wand, more control but more work.

xenoid

Posted 2018-06-05T21:55:04.400

Reputation: 7 552

-1

One option could be to use the Color Select Tool (hold down Shift to select multiple areas if necessary). If you then set the alpha color, it should only affect the selected portion.

Alternatively, you could reverse the selection, cut and paste into a new image with a transparent background.

Worthwelle

Posted 2018-06-05T21:55:04.400

Reputation: 3 556

-1

Use color to alpha, like here:

enter image description here

You have to make sure the file has transparency or else the command will not appear

lesolorzanov

Posted 2018-06-05T21:55:04.400

Reputation: 166

If you use Color-to-alpha without a selection parts of the logo can become partially transparent if their color is close to the background (for instance, light colors if the background is white), and this is precisely what the OP is trying to avoid. – xenoid – 2018-09-22T23:27:41.977

True, that is why you can also choose the color and also do it in a selection. The problem with just selecting with the wans is it becomes blocky and looks bad with different backgrounds – lesolorzanov – 2018-09-24T13:02:07.570

I don't see any answer suggesting to "just select with the wand", even if some start with it... – xenoid – 2018-09-24T13:06:18.613

See the first answer. It says "Do a wand/fuzzy select on the background". It may have grow o shrink but it will still be blocky. Try it yourself instead of just down voting because you dont like it. I use this one because I put logos in my posters and blocky artefacts appear with the wand. If you shrink/grow the selection it will always be blocky, that is the way morphology works in the regions. Selecting with wand is mathematically worse all the time. – lesolorzanov – 2018-09-24T16:13:38.427

This is actually a good answer for the problem https://graphicdesign.stackexchange.com/questions/5446/making-the-background-of-an-image-transparent-in-gimp with many suggestions if you don't like mine

– lesolorzanov – 2018-09-24T16:15:24.907

You didn't read the answer fully... You do the Selection, then a Select>Grow, and then a Color to Alpha. So the C2A only happens on the background and on the edge pixels, where it really matters. Try it for yourself... – xenoid – 2018-09-24T19:24:05.703