diff options
Diffstat (limited to 'display/dpy_pygame.py')
-rw-r--r-- | display/dpy_pygame.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/display/dpy_pygame.py b/display/dpy_pygame.py index 498b5dc..a3c2a1f 100644 --- a/display/dpy_pygame.py +++ b/display/dpy_pygame.py @@ -72,7 +72,8 @@ class Display: def pixmap(self, w, h, data, colorkey=-1): print(f"pixmap type(data) = {type(data)}, data={data[:128]}", file=sys.stderr) - img = pygame.image.fromstring(data, (w, h), "RGB") + print(f"pixmap len(data) = {len(data)}, (h, w) = {(h, w)}", file=sys.stderr) + img = pygame.image.fromstring(data[:w*h*3], (w, h), "RGB") if colorkey >= 0: r = colorkey & 0xFF g = (colorkey >> 8) & 0xFF |