mapImage(): testing speed (remove debugging lines)