title: QImage from file content
body: <p>I have a table in my DB which contains information about images (like width, height, content-type, file-type and file content). In column <code>file_content</code> stored entire image (not pixel data or something else - entire file readed and stored as binary data). Now I want to create QImage (or QPixmap) from this record in my application on Python+PySide. How can I do it?</p>
  
  <p>I tried loadFromData, but it is expects raw pixel data, not file with header like in my case.</p>
  
  <p>Actually, I have no idea hot to solve it.</p>
  
  <p>UPD: My code sample which does not works:</p>
  
  <pre><code>    with open('Koala.jpg', 'r') as f:
          content = f.read()
  
      self.image = QtGui.QImage()
  
      print self.image.loadFromData(content)
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>False
  Corrupt JPEG data: 1 extraneous bytes before marker 0xd9
  JPEG datastream contains no image
  </code></pre>