samedi 27 juin 2015

Displaying Image (in bytes) in PyQt

I need to know how to display an image in bytes in GUI. I am taking an image from google static map API with .content I get the image in bytes like this:

import requests

a = requests.get('http://ift.tt/1IkZW5p')
print(a.content)

I want to display it in the interface i am creating. I know that i can save the bytes in an image and then create a QPixmap loading the image and adding it to a scene or maybe a Qlabel, but can I display the image in the interface without doing this?

I would appreciate any help.

Aucun commentaire:

Enregistrer un commentaire