1

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?

3

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. – Ilmari Karonen Jun 15 '16 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 '16 at 22:46
  • so, is there an 'automatic' way to remove those artifacts? – user2678074 Jun 16 '16 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 '16 at 12:37

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.