I've been trying to use GIMP's foreground select tool to make cut-outs, but I've had something along the following lines thrice in the last two days, losing hours of work:

  1. I start the foreground select tool. I make a rough outline, preview the mask, and start refining the foreground / background specification in places where the mask isn't quite right.
  2. While refining, I try to redo a step and mistype ctrl+y (actually command+y since I'm on a Mac) as y.
  3. The foreground / background spec is converted to a selection (because the y invoked some command I'm unfamiliar with, and certainly didn't intend). This selection is unusable because it's wrong in all the places I hadn't refined yet: it over-selects in some places and under-selects in others.

I'd like to undo that "convert to selection" action, so I can pick up the drawing of foreground / background from where I had mistyped ctrl+y. Is this possible? If not, how would one defend against this kind of error?

I've tried to recover from it by starting a new foreground-select session and converting that to a selection in "add to current selection", but I find creating a diff of selections is really mentally taxing and error-prone in its own right. I gave up when I made the same error again during that correction session.

1 Answer 1


Not sure what to tell you here except perhaps don't press Y. That is the shortcut key for switching to the MyPaint Brush tool. Changing to another tool will cancel the Foreground Select operation. Don't do that!!!

To help with your work flow, perhaps you are just trying too hard to refine the selection using the Foreground Select tool. Try not to overthink the operation of this tool. It's really quite simple. And don't stress!!!!

  1. Use the Foreground Select tool to get your initial selection. Don't worry about refining too much at this stage, and don't fuss over getting intricate details. You don't really need anything much more than a simple selection. Using the Foreground select tool to outline the subject roughly, hit enter, and then use the brush to mark the inside of foreground (or subject).

enter image description here

  1. You can preview your selection at this stage, but just go right ahead and hit the Select button in the Foreground Select popup.

  2. Hit the New Layer Mask icon in the layers panel, choose the "selection" option, and hit Add.

enter image description here

  1. When the layer mask is applied, do Select > None.

  2. Alt+click on the layer mask thumbnail. This toggles visibility of the mask so that you can edit the mask to refine it. Everything that is black in the mask is transparent, and white areas are opaque.

  3. To refine the mask, select the Brush Tool. Select a soft edged brush. Set the bursh mode to Overlay. Set the default (black/white) foregound/background colours by hitting D. Hit X to switch the brush foreground and background colours.

  4. If there are parts of the mask that you need to fill in, choose White as the foregrounf colour and paint on the image.

  5. If there are parts of the mask that are not black enough (transparent), set the foreground colour to black, and paint on these.

  6. Repeat steps 7 and 8 until you are happy with the mask

enter image description here

  1. When you have finished Alt+click on the layer mask thumbnail to toggle back to the normal view. You can still go back and to step 6 above and continue to refine it if necessary.
  • Oooh, I see. That's a much better workflow. Totally misunderstood how to use foreground select. Thanks!
    – Jun Inoue
    Nov 7, 2022 at 2:35

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.