[Image-SIG] PIL.Image and binary data in SQL
Tue, 16 Oct 2001 09:47:34 +0200
klint price wrote:
> Does anyone know how use the PIL.Image to read binary image
> data from a database, create thumbnails, and out put the thumbnails
> to the browser using a binarywrite, or something to that effect?
> Using IIS5, MSSQL 7, and ASP.
lots of people have written web gallery tools based on PIL; a
google search should help you find plenty of sample code.
the PIL parts could look something like this:
data = read_from_database()
file = StringIO.StringIO(data)
image = Image.open(file)
outfile = StringIO.StringIO()
data = outfile.getvalue()