reading image from database

Ivan <[email protected]>
Newsgroups gmane.comp.python.image
Message-ID <[email protected]>
I want to use PIL library for crop image on the fly. In my python script:

cursor = connection.cursor()
cursor.execute("SELECT file from table");
row = cursor.fetchone();
filetype = imghdr.what(0,row[0]);
mimetype = 'image/' + filetype;
response = HttpResponse(row[0],mimetype = mimetype );

How to correct use PIL library for read image to Image object and return image after crop ?

_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.