Question: Threshold on an image is it not the same as a loop with round

When using Threshold on an image that has been converted to grayscale is it not the same as this loop?

a:=ToGrayscale(img);

for i from 1 to Width(a) do
  for j from 1 to Height(a) do
    a[i,j] := round(a):
  od:
od:

 

 

Please Wait...