data = "">
image = pygame.image.frombuffer(data[0],(data[1],data[2]),"RGB")
But this has problems. It doesn't crash, but the image is upsidedown and the red and blue color channels appear to be flopped. I tried fixing it with surfarray, which didn't work. Then I tried finding what was wrong, and got inconsistent results.
How can I get the second method (method 2: STRING->PYGAME) to look like the first method (method 1: STRING->PIL->STRING->PYGAME)? main.py lets you switch back and forth (press 1 for method 1, 2 for method 2).
Ian
Attachment:
VideoCapture.py
Description: Binary data
Attachment:
main.py
Description: Binary data