I am working on a simple project using pygame and I need to get and set pixel colors.
Using pygame.get_at(())
and pygame.set_at(())
is VERY slow.
So I tried using PixelArray to get and set the colors manually. But this still is VERY slow
Is there a much faster way to do this?
Is it possible to make a funtion to get and set a pixel in c++ so it would be faster or is there a way in python/pygame to do it?
For example:
a c++ function that returns the pixel color at a given coordinate and another function that sets the pixel at a given coordinate to a given color.
Then I could call these functions in pygame somehow.
Thank you very much.