0

I've been designing some custom backgrounds for a game recently, although I have little to no skill with photo editing. I've usually only used MS paint, but this particular project required tools that I could only access (for free) through the Gimp editing software.

I've no skill with Gimp, and while a lot of the functions were ridiculously useful, most of the time I'm just confused and lost in all the different tools and values. So, for a particular element of my design, I decided to export my project to a png file and do some tweaking in good ol' MS Paint.

The element consisted of black and white, and so I used a red background because I thought the sharp contrast would make it easy to remove later on. After finishing on paint, I opened the file in Gimp, pressed Select > By Color, and selected the red background. After deleting the background, I saw that there was a layer of red all around the remaining elements.

I tried increasing the threshold, but then it selects bigger parts of the element as well. It's the same issue with the magic wand tool. I don't seem to be able to cut my element away from the background. Are there any tools in gimp that could help me? Its all still greek to me, and playing around with the different functions was, unfortunately, no help.

  • Hi. Welcome to GDSE. Please share an image to show what you are trying to achieve, and possibly also the original image you started with. It's almost impossible to answer without something visual. – Billy Kerr Feb 18 at 23:52
0

The red halo occurs because the edge of things is made of pixels that are a blend of the background and the subject colors. Depending on threshold fuzzy-select either selects them fully (jagged edges) or not at all (halo).

The right solution is to use Color>Color to alpha to replace the backgroud by transparency (so that you get edge pixels that are partially transparent where needed).

If your background is of a very different color from the rest, use Color>Color to alpha and sample your background color to remove it, without using any selection.

If this leads to some parts that turn partially transparent, the procedure is slightly longer:

  • Fuzzy-select the background
  • Select>Grow the selection so that it includes the edge pixels (normally, one or two pixels are enough)
  • Colors>Color to alpha

In Gimp 2.8, Color-to-alpha adds and alpha channel automatically if there is none, in Gimp 2.10 you have to make sure there is one before using Color-to-alpha.

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.