For learning purposes, I\'m creating a site using Python+Flask. I want to recover an image from database and show it on screen. But one step at a time.
I have no idea ho
I hope this will work for you.
import Image import StringIO im = Image.open("file_name.jpg") # Getting the Image fp = StringIO.StringIO() im.save(fp,"JPEG") output = fp.getvalue() # The output is 8-bit String.
StringIO Image