When opening a image from a StringIO the StringIO position pointer is not reseted. There should be a call to seek(0,0) before starting loading the image from the StringIO. I can provide a patch if needed. Thanks JC Lopes