+ 3
Please I need to know how to download images and then present them in a tkinter Label.
Por favor, necesito saber cómo descargar imágenes para luego presentarlas en una etiqueta de tkinter.
7 Antworten
+ 1
https://code.sololearn.com/cm9RRK2WAYts/?ref=app creo que esto te debe funcionar. btw en stackoverflow.com puedes encontrar respuesta a la mayoria de preguntas q tengas
+ 2
The first thing you have to do is to download the image. Then you have to save the binary data you downloaded (the image) in a file.
The last thing is to display the image on a tkinter window using widget Label with the image.
NOTE: You're image has the be in some of the following formats (gif, png). If the image is in another format tjen tkinter won't recognize the image and wont display it. To display images in tkinter with other formats you can use pillow library.
+ 2
But how can I download the photos with Python and then print him with Label?
Hacker-KR4636 Lobo Solitario
+ 1
Primero descarga la imagen y colocas la ruta la sintaxis es
ventana = Tk()
imagen = PhotoImage(file="nombre.png")
guardar_imagen = Label(ventana,image=imagen)
guardar_imagen.pack()
ventana.mainloop()
+ 1
To download an image you can use sockets, urllib, request, (Standard libraries), etc
+ 1
But how?
Hacker-KR4636
Show me please
+ 1
Gracias, Bakteria