how to display PIL image with pygame?
问题 I am trying to do some video stream from my raspberry pi over the wifi. I used pygame, because i also have to use gamepad in my project. Unfortunately I stucked on displaying received frame. Shortly: i get jpeg frame, open it with PIL, convert to string - after that i can load image from string image_stream = io.BytesIO() ... frame_1 = Image.open(image_stream) f = StringIO.StringIO() frame_1.save(f, "JPEG") data = f.getvalue() frame = pygame.image.fromstring(frame_1,image_len,"RGB") screen