> Something like the following might be worth a go:
> (untested)
> 
> from PIL import Image
> img = Image.open(StringIO(blob))
> print img.format
> 

This worked quite nicely.  I didn't
see a list of all returned formats though
in the docs.  The one image I had returned

PNG

So I'm doing:

mime_type = "image/%s" % img.format.lower()

I'm hoping that will work for any image type.

Thanks,

Tobiah
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to