Skip to content
Advertisement

how can i show the front cover image of an audio file

I am working on a music player program, i wanted to show the song default image while playing it, so how can I add and show it in a Tkinter window. this what i have tried:

JavaScript

Output:

JavaScript

this helped me to get all the information about its cover image but i wanted to show it in my Tkinter window.

Advertisement

Answer

The album artwork is returned in a list of dictionaries. So to access the first picture use: metadata.pictures[0] and to access the byte data of that picture use: metadata.pictures[0].data Try (Explanation in code comments):

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement