diff --git a/Source/image/simba.image.pas b/Source/image/simba.image.pas index 513446254..27930b811 100644 --- a/Source/image/simba.image.pas +++ b/Source/image/simba.image.pas @@ -2362,10 +2362,10 @@ function TSimbaImage.ThresholdSauvola(Radius: Integer; AInvert: Boolean; R: Sing for Y := 0 to H do for X := 0 to W do begin - Left := Max(X-W, 0); - Right := Min(X+W, W); - Top := Max(Y-W, 0); - Bottom := Min(Y+W, H); + Left := Max(X-Radius, 0); + Right := Min(X+Radius, W); + Top := Max(Y-Radius, 0); + Bottom := Min(Y+Radius, H); //Sum := 0; //SumSquares := 0;