GaussianBlur

procedure GaussianBlur(img: TImage32; rec: TRect; radius: Integer);

Note: FastGaussianBlur is generally recommended over GaussianBlur since it closely approximate GaussianBlur though much faster.

  uses Img32, Img32.Extra, Img32.Fmt.PNG;
  ...
  img := TImage32.Create;
  img.LoadFromFile('lenna.png');
  GaussianBlur(img, img.Bounds, 10);
  img.SaveToFile('lenna_gauss.png');
  img.Free;
    
  uses Img32, Img32.Extra, Img32.Fmt.PNG;
  ...
  var
    img: TImage32;
    rec: TRect;
    pt: TPoint;
  begin
    img := TImage32.Create(256, 256);

    rec := Rect(img.Width - 120, 0, img.Width, 120);
    pt := MidPoint(rec);
    DrawPoint(img, PointD(pt), 20, clNavy32);
    GaussianBlur(img, rec, 48);

    Windows.OffsetRect(rec, -120, 0);
    pt := MidPoint(rec);
    DrawPoint(img, PointD(pt), 20, clNavy32);
    GaussianBlur(img, rec, 24);

    rec := Rect(img.Width - 120, img.Height -125, 
      img.Width, img.Height-5);
    pt := MidPoint(rec);
    DrawPoint(img, PointD(pt), 20, clNavy32);
    BoxBlur(img, rec, 12, 3);

    Windows.OffsetRect(rec, -120, 0);
    pt := MidPoint(rec);
    DrawPoint(img, PointD(pt), 20, clNavy32);
    BoxBlur(img, rec, 6, 3);

    img.Free;
    

See Also

FastGaussianBlur