How to Defocus Backgrounds in GIMP with Box Blur

This guide explains how to use the GEGL-based Box Blur filter in GIMP to quickly create a shallow depth-of-field effect and defocus image backgrounds. You will learn how to isolate your subject, apply the high-performance Box Blur algorithm, and fine-tune blur parameters to achieve a smooth, professional background blur with minimal processing time.

Step 1: Duplicate Your Image Layer

  1. Open your image in GIMP.
  2. Go to the Layers panel on the right.
  3. Right-click your main image layer and select Duplicate Layer (or press Ctrl + Shift + D).
  4. Rename the top layer to "Subject" and the bottom layer to "Blurred Background".

Step 2: Isolate the Subject

  1. Select the "Subject" layer.
  2. Choose a selection tool from the toolbox, such as the Foreground Select Tool, Paths Tool, or Quick Mask (Shift + Q).
  3. Carefully create a selection around the main subject that you want to keep sharp.
  4. With the selection active, right-click the "Subject" layer in the Layers panel and choose Add Layer Mask.
  5. In the dialog, select Selection and click Add. Your subject is now isolated on the top layer.

Step 3: Apply the GEGL Box Blur

  1. Select the "Blurred Background" layer.
  2. Remove any active selections by going to Select > None (Ctrl + Shift + A).
  3. Navigate to Filters > Blur > Box Blur... in the top menu.
  4. Ensure the Preview and Split view options are enabled to monitor changes in real time.
  5. Increase the Radius slider to control blur intensity. Since Box Blur calculates the average of neighboring pixels rapidly, it processes heavy blur radii much faster than standard Gaussian blur.
  6. Adjust horizontal and vertical radii independently if you wish to create a directional defocus effect.

Step 4: Refine Edge Halos (Optional)

If a glowing fringe of the subject appears around the edges of the blurred background:

  1. Hide the top "Subject" layer.
  2. Select the "Blurred Background" layer.
  3. Use the Clone Tool or Heal Tool to roughly paint over the area behind the original subject before applying the blur.
  4. Make the "Subject" layer visible again to ensure seamless blending.

Step 5: Finalize the Image

Click OK in the Box Blur dialog to commit the changes. Export your finished composition by going to File > Export As... and selecting your desired format.