Hi, I know this may have to do with my use of S3 but I'm searching for any little thread that I can hang onto to solve this problem.
If I retrieve an image from boto (S3) and then try and open it with PIL I get an IOError: cannot identify image file. Here is the code: s3 = S3Connection('blah','blah') bucket = s3.get_bucket('my_bucket') key = bucket.get_key(key_name) file = StringIO() key.get_file(file) Image.open(file) # .. here I wish to crop the image before spitting it back to the calling environment I know that the file I retrieve with the "key.get_file(file)" statement is in good shape because if I take out the PIL code and turn around and set the Content-Type header to image/jpeg and fire the file object back at the browser (this code is in a web app controller) the image appears just fine! By briefly looking at the code in PIL it seems it is inspecting the first 16 bytes of the file and determining if it can recognize it but I don't understand why it isn't recognizing it. Any suggestions? Cheers
_______________________________________________ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig