Can someone help me with the following problem.
I have a datastream loaded into a variable (s in this example) which contains all the jpeg file data.
Currently the only way I can load the image is to save the datastream to a temp file, then load it, then delete the temp file.
This isn't too complex but feels like it is bad coding.
Is there a way in python to load an image directly from a variable.
current bloaty code:
ThanksCode:f=open('c:\\temp.jpg','wb') f.write(s) f.close() img=Image.open('c:\\temp.jpg') os.remove('c:\\temp.jpg')