I'm writing an API with Flask that takes a file as input, manipulates it with OpenCV, and then I want to return the file. Ideally I'd be able to return the file along with some meta data (the time it took the operation to complete).
The line that produces the image I want to return is:
image = cv2.rectangle(image, start_point, end_point, color, thickness)
Ideally I could return this straight from memory (without ever writing a temporary file)
Is this even possible?