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;
Copyright ©2010-2023 Angus Johnson - Image32 4.8 - Help file built on 17 Jan 2025