Now right-click on the New Bg layer and select “Add Layer Mask”.
In the Add Mask Options dialog, select white (Full Opacity) and click OK.
Go to the image window containing your prepared layer mask. Select All and Copy (Ctrl+A then Ctrl+C). Now back to the working image window and Paste (Ctrl+V). In the Layers dialog, anchor the pasted image into the layer mask.If your mask is like mine, you’ll need to invert it (Image/Colors/Invert) so that the part corresponding to the subject is black. Also, if you haven’t blurred the mask slightly yet, apply a gaussian blur (Filters/Blur/IIR Gaussian Blur) with a radius of a few pixels.In your image window you should now see only the isolated subject, surrounded by the fill of the New Bg layer.
Now it is simply a matter of pasting your new background into the New Bg layer, or creating a new one. Here I’ll show you how to mimic a background you see in a lot of portraits.In the GIMP toolbox, set the foreground and background color swatches to the light and dark end colors for a gradient background. You set the color by clicking on a swatch icon and using the color editor to select a color. Alternatively, you can open the Palette dialog, choose a color palette and pick two colors from that. In the GIMP toolbox, double-click the Blend (gradient) tool to bring up the Tool Options dialog. Choose Gradient type “Radial”.In the Layers dialog, click on the image thumbnail for the New Bg layer to select it instead of its layer mask.Go back to the image window, click down in the center of the subject and drag out towards an edge. A gradient should fill the background. If you don’t like the effect, Undo (Ctrl+Z) and try again or change your colors.
Consider adding some fog.Here I duplicated the New Bg layer so I have the same layer mask and the fog only shows up in the background. For fog I simply ran a Filter/Render/Plasma, desaturated it, put the layer in Overlay mode and reduced the layer transparency to about half.