Added blocking image capture function.