Good afternoon I wanted to tell you something that happened to me when using the camera to transfer images to a client through the USB-VCP commands.
Even though the camera almost always sends the requested image correctly. Sometimes the image that is sent is cut (CapturaOCRW146.jpg) and at other times the image that is sent is damaged (CapturaOCRW26.jpg).
When opening the file of the damaged image in hexadecimal format I noticed that at the beginning there was a text that was sent to print in the code.
It is not clear to me how this text is entered into a variable received with the command img = sensor.snapshot ().
I am attaching the above code and images to see if you can explain to me why this error occurs and how to try to solve it.
Thanks in advance.
main.py (4.42 KB)