[PLEASE HELP] How can I convert byte jpeg data received from live method call to a format which is readable/manageable

I have made a successful live method call as per link: https://doc.developer.milestonesys.com/html/reference/protocols/imageserver_request_response.html

and using sockets, I am receiving using this code snippet:

while True:

test = s2.recv(4096)

print(test)

but the response I am getting is an endless stream of —> b’’

Is there perhaps a way to parse this stream of b’'s to get the image stream for processing with openCV ? Thanks in advance for the help.

I wonder if this helps? - https://developer.milestonesys.com/s/article/How-to-save-a-JPEG-image-file-based-on-JpegData