Retaining colours after colour to alpha - Printable Version

+- (
+-- Forum: GIMP (
+--- Forum: General questions (
+--- Thread: Retaining colours after colour to alpha (/Thread-Retaining-colours-after-colour-to-alpha)

Retaining colours after colour to alpha - motorsportfurniture - 07-12-2017

Please see attached image.

I have roughly cropped the driver - inverted the selection, then cut, to delete the background. Then I have feathered the edges and then 'Colour to Alpha' to completely get rid of a background, so I can put the cropped part on any colour.

However my problem is, obviously all the white / very light areas of the cropped selection are also deleted because my colour to alpha was to remove white. So if i place on a dark backround, it shows through.

How do I retain 'ALL' the original colours from the cropped selection but still have no background.

I'm sure there's a much easier way but I'm new at this so apologies!

Any advice appreciated!


RE: Retaining colours after colour to alpha - Blighty - 07-12-2017

In your sample image you have a pure white background. This isn't always the case, there are sometimes jpg artifacts etc. The general method is:

1. Get rid of most of the background. Use the Fuzzy Select tool to select the white background. Delete the background. Deleting will get rid of the off white jpg artifacts etc

2. Step 1 will leave a light (almost white) halo around the image. Use (Select > Grow) with a suitable value (often 1 to 3 pixels) to include the white halo in the selection

3. Use Colour > Colour to Alpha with the default white to get ride of the white halo

4. Select > None

RE: Retaining colours after colour to alpha - rich2005 - 07-12-2017

Blighty has given the start again from beginning, however

The way you describe is a terrible way of removing a background, so the rescue mission

You did something like this. Rough select, cut, then color-to-alpha to remove all white

It is possible to select areas of 'alpha' much the same as any color. Use the fuzzy select tool, put it in add mode put the threshold right down (zero-ish) and click in individual areas to build up the complete selection.

Grow that selection 4 or 5 pixels and invert.

A new transparent layer under, fill the selection with white.

Save your work as a gimp .xcf for any editing in the future. Export as a png for a 'flat' file with transparency.

RE: Retaining colours after colour to alpha - rich2005 - 07-12-2017


If you do not have a nice plain background, a video demo using your image and the foreground select tool. 2 minutes

the gimp help section