I think it starts in some order, say left, right, top, bottom. When it finds a line at the edge of the same colour, it locks on to that colour.
It could very well have given you a red image with a black border except on the right side, if it's not defined in the docs.
/ Mirar
Previous text:
2003-07-23 20:03: Subject: autocrop
But the left "border" is a different color than the right "border", so why is it considered a border? Compare the last example with
Tools.PV( Image.Image(80,80,0,0,0)->box(10,10,70,70,255,0,0)->box(0,0,10,80,0,255,0)->autocrop() );
/ Martin Nilsson (ja till euro, nej till cent)