Fix Purple Fringing in GIMP With Color Masks

High-contrast backlit tree branches frequently suffer from purple fringing, a form of chromatic aberration caused by lens dispersion and sensor blooming. This guide outlines the precise steps and tool settings required in GIMP to isolate the affected edges using a selection mask and neutralize magenta artifacts using the Color Balance tool without altering the surrounding sky or natural foliage.

Step 1: Duplicate the Layer and Isolate the Fringe

  1. Open your image in GIMP.
  2. In the Layers dialog, right-click the base layer and select Duplicate Layer. Name this layer "Fringe Correction."
  3. Choose the Select by Color Tool (Shift + O) from the toolbox.
  4. In the Tool Options panel, set:
    • Threshold: Between 15.0 and 25.0 (adjust based on the contrast of the purple fringe).
    • Antialiasing: Checked.
    • Select transparent areas: Unchecked.
  5. Click on the most prominent purple fringe along a backlit branch to select the chromatic aberration across the image.
  6. Soften the edge transitions by going to Select > Feather and setting the radius to 1.5 or 2.0 pixels.
  7. Right-click the "Fringe Correction" layer, choose Add Layer Mask, select Selection, and click Add.
  8. Go to Select > None (Ctrl + Shift + A) to clear the active marching ants.

Step 2: Configure the Color Balance Settings

Click on the layer thumbnail (not the mask thumbnail) of the "Fringe Correction" layer, then navigate to Colors > Color Balance. Apply the following adjustments:

  • Preserve Luminosity: Check this box to prevent the edges from visibly darkening or brightening.

Midtones (Primary Adjustment)

  • Cyan - Red: 0 to -10 (slight shift toward Cyan).
  • Magenta - Green: +30 to +60 (shifts directly toward Green to counteract the primary magenta cast).
  • Yellow - Blue: -20 to -45 (shifts toward Yellow to eliminate secondary blue/violet halos).

Highlights (For Sky Bleed)

Select the Highlights radio button if the purple cast bleeds into the bright sky background:

  • Magenta - Green: +20 to +40
  • Yellow - Blue: -15 to -30

Step 3: Fine-Tuning the Correction

  1. Toggle the visibility of the "Fringe Correction" layer using the eye icon to verify that the purple fringe turns into a neutral, natural branch tone.
  2. If the correction introduces a green halo into non-fringed areas, select the Layer Mask thumbnail, select a soft black brush (B) set to 30% opacity, and paint over the areas you wish to protect.
  3. If the corrected edges appear slightly oversaturated, lower the opacity of the "Fringe Correction" layer to around 85%–90% for a seamless blend.