Remove JPEG Artifacts in GIMP with Wavelet & Despeckle

JPEG compression often introduces unwanted pixelation, blocky patterns, and "mosquito noise" around sharp edges. In GIMP, you can effectively clean up these artifacts using the built-in Despeckle filter and the Wavelet Decompose tool. This guide provides a straightforward, step-by-step process to eliminate compression noise while preserving the fine details and textures of your image.

Method 1: Clean Noise Quickly with the Despeckle Filter

The Despeckle filter is ideal for removing simple noise and smoothing out low-contrast artifacts in flat color areas (like skies or backgrounds).

  1. Open your image in GIMP.
  2. Duplicate the layer by going to Layer > Duplicate Layer so you can preserve your original work.
  3. Open the Despeckle tool by navigating to Filters > Enhance > Despeckle....
  4. Adjust the settings:
    • Radius: Defines the sample area. Keep this between 1 and 3 to avoid blurring critical details.
    • Black Level: Adjust to remove dark speckles without affecting dark lines.
    • White Level: Adjust to remove light speckles.
  5. Check the Preview box to ensure edges remain sharp, then click OK.
  6. Apply a Layer Mask (Optional): Add a layer mask (Layer > Mask > Add Layer Mask) and paint with black over sharp, detailed areas to restrict the smoothing only to noisy backgrounds.

Method 2: Target Artifacts Selectively Using Wavelet Decompose

Wavelet Decompose separates an image into multiple layers based on frequency (fine details, medium textures, and broad colors). This allows you to blur or remove JPEG artifacts on detail layers without destroying the underlying colors or shapes.

  1. Navigate to the filter: Go to Filters > Enhance > Wavelet Decompose....
  2. Set the scales: Set the Scales slider between 5 and 7 and ensure Create layer group is checked. Click OK.
  3. Inspect the generated layers: GIMP will generate a series of grayscale layers labeled Scale 1, Scale 2, etc., along with a Residual layer at the bottom.
    • Scale 1 and Scale 2 contain the finest details, which is where JPEG ringing and blockiness usually reside.
  4. Smooth the artifacts:
    • Select the Scale 1 layer.
    • Go to Filters > Blur > Gaussian Blur....
    • Set the blur size to a low value (between 0.5 and 1.5 pixels) to dissolve the harsh JPEG edges.
    • Repeat the process on Scale 2 if larger block artifacts are still visible.
  5. Adjust layer opacity or erase: If blurring introduces too much softness, reduce the opacity of the Scale 1 layer slightly, or use a soft Eraser tool directly on the Scale 1 layer to manually remove artifacts in flat regions while leaving textures untouched.
  6. Merge the result: Once the artifacts are gone, right-click the Wavelet layer group in the Layers dialog and select Merge Layer Group to combine your cleaned image.