Convert imencode output buffer to string or byte array

asked 2013-08-07 19:06:02 -0500

JR_ gravatar image

Hello,

I've encoded an webcam image using the following Python code:

result,encimg=cv2.imencode('.jpg', img, [1,95])

In order to send the image over the network it has to be converted into a string or byte array (and vice versa on the receiving end). Any idea's on how to do this?

Thanks in advance and with best regards.

edit retag flag offensive close merge delete