def current_img_b64(): b64 = None frame = current_img() if frame != None: png = cv2.imencode('.png', frame)[1] b64 = base64.encodestring(png) return b64 # GET /see # returns the current image