Optimized rect finding algorithm by not rereading pixels across the X axis that we already know are good. Optimization could do with improvements though.