Got the image capture function working!!!