[Solved] Efficient loading of Pygamescreens to 2D-lists

[ad_1]

You can almost triple the speed by using pygame.surfarray.

But I don’t thing you actually want to have a list of the pixels. Please post a new question with you underling problem, as @hop suggested.

def load(screen):
    return pygame.surfarray.pixels2d(screen).tolist()

[ad_2]

solved Efficient loading of Pygamescreens to 2D-lists