Declarations ​
procedure Blur32(ASource, ADest: TBitmap32; Radius: TFloat); overload;
procedure Blur32(Bitmap: TBitmap32; Radius: TFloat); overload;
procedure Blur32(Bitmap: TBitmap32; Radius: TFloat; const Bounds: TRect); overload;
procedure Blur32(Bitmap: TBitmap32; Radius: TFloat; const Region: TArrayOfFloatPoint); overload;Overload Details
Overload 1 ​
procedure Blur32(ASource, ADest: TBitmap32; Radius: TFloat); overload;Blurs the source bitmap and writes the result into the destination bitmap.
| Parameter | Type | Description |
|---|---|---|
ASource | TBitmap32 | Source 32-bit bitmap to read pixels from. |
ADest | TBitmap32 | Destination 32-bit bitmap to receive the blurred output. |
Radius | TFloat | Blur radius in pixels. |
Overload 2 ​
procedure Blur32(Bitmap: TBitmap32; Radius: TFloat); overload;Blurs the entire bitmap in-place.
| Parameter | Type | Description |
|---|---|---|
Bitmap | TBitmap32 | Bitmap to blur in-place. |
Radius | TFloat | Blur radius in pixels. |
Overload 3 ​
procedure Blur32(Bitmap: TBitmap32; Radius: TFloat; const Bounds: TRect); overload;Blurs a rectangular sub-region of a bitmap in-place.
| Parameter | Type | Description |
|---|---|---|
Bitmap | TBitmap32 | Bitmap containing the sub-region to blur. |
Radius | TFloat | Blur radius in pixels. |
Bounds | TRect | Bounding rectangle defining the target sub-region. |
Overload 4 ​
procedure Blur32(Bitmap: TBitmap32; Radius: TFloat; const Region: TArrayOfFloatPoint); overload;Blurs an arbitrary polygonal region of a bitmap in-place.
| Parameter | Type | Description |
|---|---|---|
Bitmap | TBitmap32 | Bitmap containing the polygonal region to blur. |
Radius | TFloat | Blur radius in pixels. |
Region | TArrayOfFloatPoint | Array of 2D floating-point points defining the polygon vertices. |
Description ​
Blur32 performs spatial Gaussian blurring on 32-bit ARGB bitmaps using a high-performance Infinite Impulse Response (IIR) recursive Gaussian filter.
The filter execution time is Radius.
Radius Threshold ​
If Radius is less than Blur32MinRadius (default Blur32 skips filter calculations. For out-of-place calls (ASource, ADest), ASource is copied directly to ADest. For in-place calls, the procedure exits immediately.
Channel Processing ​
All four color channels (Red, Green, Blue, Alpha) are processed. Blurring the Alpha channel produces smooth antialiased region borders and drop shadows.
Example ​
var
Bmp: TBitmap32;
begin
Bmp := TBitmap32.Create;
try
Bmp.LoadFromFile('input.png');
// Blur entire bitmap in-place with a 5.0 pixel Gaussian radius
Blur32(Bmp, 5.0);
Bmp.SaveToFile('blurred.png');
finally
Bmp.Free;
end;
end;