pygame_sdl2 icon indicating copy to clipboard operation
pygame_sdl2 copied to clipboard

No functions tostring and fromstring

Open DoctorBooooom opened this issue 9 years ago • 1 comments

I use encryptor to protect my images, so i store it like encrypted strings and can't create images from string http://www.pygame.org/docs/ref/image.html#pygame.image.tostring http://www.pygame.org/docs/ref/image.html#pygame.image.fromstring

DoctorBooooom avatar Mar 22 '16 12:03 DoctorBooooom

I too have need of the image.tostring() and related methods.

I can see they appear in class ImageModuleTest within pygame_sdl2/test/image_test.py, but as far as I can tell, this does not work, as I do not see the method in the src for pygame_sdl2.image

Is there some trick to enable the original pygame.tostring() method to use for image processing, yet preserve the rest of pygame_sdl2?

When I use pygame_sdl2.import_as_pygame(), I no longer have access to pygame.image (instead getting pygame_sdl2.image without the tostring() method). But then I try importing both pygame_sdl2 and pygame, I get all kinds of warnings such as this: "If you try to use both the pygame_sdl2 and pygame libraries in the same program you may encounter errors; such as library import failures in frozen programs."

Thoughts on how to enable the original image.tostring()?

Remusforte avatar Oct 20 '18 12:10 Remusforte