FastGaussianBlur

procedure FastGaussianBlur(img: TImage32; const rec: TRect; stdDev: integer; repeats: integer);

This procedure produces a very good approximation of GaussianBlur, but it's very much faster. The stdDev (standard deviation) parameter determines the amount of blurring, whereas repeats determines blur quality. Obviously more repeats will take longer, but generally 2 repeats produces excellent results with minimal impact on performance.

uses Img32, Img32.Extra;
...
img := TImage32.Create;
img.LoadFromFile('lenna.png');
GaussianBlur(img, img.Bounds, 11);
img.SaveToFile('lenna_gauss.png');

img.LoadFromFile('lenna.png');
FastGaussianBlur( img, img.Bounds, 3, 2);
img.SaveToFile('lenna_fast_gauss.png');
img.Free;
    
GaussianBlur (radius:11)
FastGaussianBlur (sd:3, rpt:2)
GaussianBlur (radius:7)
FastGaussianBlur (sd:2, rpt:2)

See Also

GaussianBlur