Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09e7d9410a | ||
|
|
6bf6ae8c97 |
No files matched your search
+14
@@ -0,0 +1,14 @@
|
||||
.DS_Store
|
||||
.idea
|
||||
*.log
|
||||
tmp/
|
||||
|
||||
*.tern-port
|
||||
node_modules/
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
*.tsbuildinfo
|
||||
.npm
|
||||
.eslintcache
|
||||
venv/
|
||||
Regular → Executable
+6
-3
@@ -1,3 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import tkinter as tk
|
||||
from tkinter import ttk
|
||||
from PIL import Image, ImageTk
|
||||
@@ -5,13 +7,14 @@ import os
|
||||
from os import listdir
|
||||
|
||||
parent = tk.Tk()
|
||||
parent.title("Image in Tkinter")
|
||||
parent.title("Perlinator")
|
||||
parent.minsize(320, 240)
|
||||
|
||||
|
||||
def button_clicked():
|
||||
global isittrue
|
||||
if isittrue == 0:
|
||||
image2 = Image.open("test/ssh.png")
|
||||
image2 = Image.open("test/tux.jpg")
|
||||
image2 = ImageTk.PhotoImage(image2)
|
||||
image_label.configure(image=image2)
|
||||
image_label.image = image2
|
||||
@@ -57,7 +60,7 @@ for images in os.listdir(folder_dir):
|
||||
if images.endswith(".png") or images.endswith(".jpg") or images.endswith(".jpeg"):
|
||||
print(images)
|
||||
|
||||
img = Image.open("test/couv.png")
|
||||
img = Image.open("test/logo.png")
|
||||
img = ImageTk.PhotoImage(img)
|
||||
|
||||
image_label = tk.Label(parent, image=img)
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
Reference in new issue
Block a user