I am as newbie in Gimp as in graphic design. For my first learning task I tried to change background color as in tutorial, but I think, I took rather challenging picture to do that. The picture i took is here:

enter image description here

When i used 'Color to alpha' on background color, shirt also disappeared. Furthermore, when I put new background layer (this case blue), my gut turned to smurf as blue from background layout shines through front layout.

I'd like to get this proper and learn how to make my guy on blue background. Can you help me, how should I do that?

  • 2
    Possible duplicate of Making the background of an image transparent in Gimp
    – Luciano
    Jun 9, 2016 at 7:57
  • there are several different questions about it.
    – Luciano
    Jun 9, 2016 at 8:00
  • Read whole thing, please! I wrote that simple Color to Alpha doesn't work in this case! This is whole issue about!!! Jun 9, 2016 at 8:21
  • Your problem seems related to the way you used to select the background (you cannot select by color: the t-shirt is of the same color of the bg). Have you tried to select the background with the magic wand tool? Jun 9, 2016 at 8:58

1 Answer 1


The solution is easy, do a selection so that the color-to-alpha only applies where it matters: the background and the edge pixels of the outline.

On a clean picture, that's wand-select the background (regular threshold) which won't select the outline (it will usually stop one pixel before) and then Select>Grow by two pixels to include the border pixels.

The problem with your picture is not the white shirt but all the JPEG compression artifacts that will:

  • possibly prevent correct selection of the background with the wand-select (may require careful adjustment of the threshold)
  • make the background not completely white, and therefore not completely transparent after the Color2Alpha, but this can be fixed by using Curves on a layer mask.
  • In practice, the JPEG artifacts aren't particularly problematic. Here's what I got using the default threshold and a bit of manual erasing to fix a few of the most conspicuous remaining white spots along the edges. Jun 15, 2016 at 16:11
  • Having to do erase things manually is the problem... if the background is completely uniform, this method creates a perfect outline, and there is no need for a manual intervention.
    – xenoid
    Jun 15, 2016 at 22:46
  • so, is there an 'automatic' way to remove those artifacts? Jun 16, 2016 at 9:59
  • No, it's a matter of compromise... if you remove them automatically you'll likely damage the anti-aliasing pixels in the outline. The right solution is to start with pictures of adequate quality. There are good versions of that picture (search for PNG format). JPEG on CGI is usually bad, when it is good enough the JPEG is bigger than the PNG, so the JPEGs you find, being used because of their smaller size, are usually unfit for further editing.
    – xenoid
    Jun 16, 2016 at 12:37

Your Answer

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

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