Hi Radomir,
Thanks for the response.
ok. This is what i want to do
i want to try to convert images into a string format and store them on disk. Better if they are unprintable characters.
then when i want to see them i will run them thrugh a decryption python script and viola they will be displayed in pygame
when i close the program again i will have only the encoded 'imageds' on the hd.
I did this usingÂ
get_screen = SCREEN.subsurface(0, 0, SCREENW, SCREENH)
with open(image_filename, "rb") as imageFile:
  imagestr = base64.b64encode(imageFile.read())
## create the text file name to save to disk
text_filename = newpath + "s" + str(va.page) + ".dat"
## save imagestr(image as a textfle) to disk
with open(text_filename, "wb") as f:
  f.write(imagestr)
I wanted a better way and hence the question.
stringio or cstringio is fine. i can save the string to disk but how can i convert it back to an image file?
Thank you for your help.