Open Guidosalimbeni opened 6 years ago
did you ever figure it out @Guidosalimbeni ?
Need the solution as well. Have you ever figured it out? @bc @Guidosalimbeni
Didn’t end up needing it. You just have to serialize the file as a string (like base64), send it as a normal message, and then in python decode the string back. zmq just uses strings to send messages (or bytes), so if you can turn whatever you want it to a string, you can send it
@bc Do you have an example code? I could not figure out though I've tried everything :)
Here are the pieces:
Here are the pieces:
- C# save a picture from the device camera
- C# load that file as a base64 string
- C#: send that string to your ZMQ python endpoint (using same approach as in this example repo)
- Python: receive that string, and pass it to base64.b64decode(message_string)
Done! Thank you for taking the time to answer my question. It was really helpful. I appreciate it.
can we send pictures from python to unity ? how ?
I wonder if you could provide also an example of how to send an image from Unity to python (for example a render from the camera view in unity to python). That would be great thanks