Working JPEG image capture