Sure, John!
Regards, Karthik
You are right! Your algorithm is actually a bit faster :-D At first it seems you've added some extra loops but when looking closer I saw that you're code check edges first instead of roaming thourgh the pixels top to bottom.
Well done!
I would like to include your algorithm in the PixelPerfect example if its ok with you?
Best Regards
/John