diff --git a/album_art.gif b/album_art.gif new file mode 100644 index 0000000..1aa5dd3 Binary files /dev/null and b/album_art.gif differ diff --git a/album_art.jpg b/album_art.jpg index 0f93ce2..b14299f 100644 Binary files a/album_art.jpg and b/album_art.jpg differ diff --git a/get_rp.py b/get_rp.py index 3a574d0..c8c2f8b 100755 --- a/get_rp.py +++ b/get_rp.py @@ -47,17 +47,19 @@ if __name__=="__main__": rp_tekstbox.insert("1.0", get_rp()[0]) rp_tekstbox.pack() -# rp_image_path = get_rp()[1] -# print(rp_image_path) ## DEBUG -# rp_image_file = requests.get(rp_image_path).content -# print(rp_image_file) ## DEBUG -# rp_file=open("album_art.jpg", 'wb') -# rp_file.write(rp_image_file) -# rp_image = Image.open(rp_image_file) - #rp_load = rp_image.load() - #image_lbl = Label(window, image=rp_load) - #image_lbl.pack() -# rp_file.close() -# rp_image.show() + rp_image_path = get_rp()[1] +# print(rp_image_path) ## DEBUG werkt! + rp_image_file = requests.get(rp_image_path).content +# print(rp_image_file) ## DEBUG werkt! + + rp_file=open("album_art.jpg", 'wb') + rp_file.write(rp_image_file) + rp_file.close() + rp_image = Image.open("album_art.jpg") + rp_image.save("album_art.gif") + + img = PhotoImage(file='album_art.gif', format='gif') + image_lbl = Label(window, image=img) + image_lbl.pack() window.mainloop() \ No newline at end of file