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

Publicado em: 24 Maio 2023
no 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


Nesta página do site você pode assistir ao vídeo on-line Image Viewer App using Python || Python project || c4rcoding duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário C 4r Coding 24 Maio 2023, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 111 vezes e gostou 6 espectadores. Boa visualização!