factored out image capture routine.
No longer dependant on autoit