Working version with jpg files visible
Needs more work to put the gif/jpg into a single function
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 8.4 KiB |
@@ -47,17 +47,19 @@ if __name__=="__main__":
|
|||||||
rp_tekstbox.insert("1.0", get_rp()[0])
|
rp_tekstbox.insert("1.0", get_rp()[0])
|
||||||
rp_tekstbox.pack()
|
rp_tekstbox.pack()
|
||||||
|
|
||||||
# rp_image_path = get_rp()[1]
|
rp_image_path = get_rp()[1]
|
||||||
# print(rp_image_path) ## DEBUG
|
# print(rp_image_path) ## DEBUG werkt!
|
||||||
# rp_image_file = requests.get(rp_image_path).content
|
rp_image_file = requests.get(rp_image_path).content
|
||||||
# print(rp_image_file) ## DEBUG
|
# print(rp_image_file) ## DEBUG werkt!
|
||||||
# rp_file=open("album_art.jpg", 'wb')
|
|
||||||
# rp_file.write(rp_image_file)
|
rp_file=open("album_art.jpg", 'wb')
|
||||||
# rp_image = Image.open(rp_image_file)
|
rp_file.write(rp_image_file)
|
||||||
#rp_load = rp_image.load()
|
rp_file.close()
|
||||||
#image_lbl = Label(window, image=rp_load)
|
rp_image = Image.open("album_art.jpg")
|
||||||
#image_lbl.pack()
|
rp_image.save("album_art.gif")
|
||||||
# rp_file.close()
|
|
||||||
# rp_image.show()
|
img = PhotoImage(file='album_art.gif', format='gif')
|
||||||
|
image_lbl = Label(window, image=img)
|
||||||
|
image_lbl.pack()
|
||||||
|
|
||||||
window.mainloop()
|
window.mainloop()
|
||||||
Reference in New Issue
Block a user