Q:

How to display album art using Mutagen in a PyQt5 application? 

I am designing a simple mp3 player using Python3.6 and PyQt5, and am I stuck when trying to display an image inside the PyQt5 application. 
I am extracting the album art using Mutagen as follows:
pict = tags.get("APIC:").data
im = Image.open(BytesIO(pict))
im.show()

This opens the image in my Windows gallery, and not inside the PyQt application (obviously).  My question is how do I embed this image inside the application itself such that the album art is displayed whenever a song is played? 
I have tried displaying a saved image inside a label like so:
self.label.setText(_translate("MainWindow", "<html><head/><body><p><img src=\":/Images/81+8w4dqVXL._" 
                                            "Cover Art.jpg\"/></p></body></html>"))

However this is not really what I am after as I would need to directly save each image to the user's machine. 
Any suggestions on how this can be implemented directly inside the application? 

A:

There's no need to use PIL for this, since you can create a QPixmap directly from the tag data, which can then be shown in the label:
pixmap = QtGui. QPixmap()
metadata = mutagen. File(filename)
for tag in metadata.tags.values():
    if tag. FrameID == 'APIC':
        pixmap.loadFromData(tag.data)
        break
self.label.setPixmap(pixmap)

