Image Viewer App using Python || Python project || c4rcoding

Publicado el: 24 mayo 2023
en el canal de: C 4r Coding
111
6

#python #pythonprojects #pythonprogramming #pythontutorial #pythonforbeginners #c4rcoding #tkinter





---------------Project Code----------------

from tkinter import *
from tkinter import filedialog
import tkinter as tk
from PIL import Image,ImageTk
import os

def showimage():
filename=filedialog.askopenfilename(initialdir=os.getcwd(), title="Select Image File", filetype=(("JPG file","*.jpg"),("PNG file","*.png"),("All file","How are you.txt")))
img=Image.open(filename)
img=ImageTk.PhotoImage(img)
lbl.configure(image=img)
lbl.image=img

root=Tk()
fram=Frame(root)
fram.pack(side=BOTTOM, padx=15,pady=15)
lbl=Label(root)
lbl.pack()

btn=Button(fram, text="Select Image", command=showimage)
btn.pack(side=tk.LEFT)

btn2=Button(fram, text="Exit", command=lambda:exit())
btn2.pack(side=tk.LEFT,padx=12)

root.title("Image Viewer")
root.geometry("400x450")
root.mainloop()





#python #pythonprojects #pythonprogramming #pythontutorial #pythonforbeginners #c4rcoding #tkinter


En esta página del sitio puede ver el video en línea Image Viewer App using Python || Python project || c4rcoding de Duración hora minuto segunda en buena calidad , que subió el usuario C 4r Coding 24 mayo 2023, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 111 veces y le gustó 6 a los espectadores. Disfruta viendo!