[Image-SIG] Place image into MySQL db.
S. D. Rose
s_david_rose at hotmail.com
Mon Dec 19 17:25:34 CET 2005
Sorry! Thank you for your help!!!!
-Dave
"Fredrik Lundh" <fredrik at pythonware.com> wrote in message
news:do41jo$4n1$1 at sea.gmane.org...
> "S. D. Rose" wrote:
>
>> I think I should have been a little more specific. I have a process that
>> takes a bunch of photos and stores them 'as taken' in .JPG format. /.../
>> I guess I could img.save(file, 'jpg') and then read the file and then
>> insert
>> it, but that seems to be a particularly in-elegant way to do it.
>
> you don't have to be more specific, you just have to read the
> replies you get:
>
> to save to a string, use a StringIO or cStringIO stream as the target:
>
> out = cStringIO.StringIO()
> im.save(out, "jpeg")
> data = out.getvalue()
>
> </F>
>
>
>
> _______________________________________________
> Image-SIG maillist - Image-SIG at python.org
> http://mail.python.org/mailman/listinfo/image-sig
>
More information about the Image-SIG
mailing list