code: def get_preview(self):
          
          lib.gp_camera_capture_preview(self._cam, self.__camfile_p[0], self._ctx)
          lib.gp_file_get_data_and_size(self.__camfile_p[0], self.__data_p, self.__length_p)
          return ffi.buffer(self.__data_p[0], self.__length_p[0])[:]
docs: Get a preview from the camera's viewport.
  
          This will usually be a JPEG image with the dimensions depending on
          the camera.  You will need to call the exit() method manually after
          you are done capturing a live preview.
  
          :return:    The preview image as a bytestring
          :rtype:     bytes