This commit is contained in:
2025-12-19 15:02:26 +01:00
parent eef8b3f879
commit 5483818309
3 changed files with 107 additions and 1 deletions

View File

@@ -1,3 +1,4 @@
from funkcje.obraz import Obraz
import FreeSimpleGUI as sg
# sg.theme('DarkAmber') # Add a touch of color
@@ -7,7 +8,7 @@ layout = [ [sg.Text('Wybrana data'), sg.In(key='data') ,sg.CalendarButton("Data
[sg.Text('Enter something on Row 2'), sg.InputText(key="row2")],
[sg.Text('Enter something on Row XX'), sg.InputText(key="inna")],
[sg.Text('Wybrany plik'), sg.In(key='input'), sg.FileBrowse(target='input')],
[sg.Button('Ok'), sg.Button('Przerwij'), sg.Button('HELP'), sg.Button("AKCJA")] ]
[sg.Button('Ok'), sg.Button('Przerwij'),sg.Button("OBRAZ"), sg.Button('HELP'), sg.Button("AKCJA")] ]
# ZADANIE:
# dodaj przycisk o nazwie SYSTEM, wtedy na ekranie ma być
# print(sys.version)
@@ -33,6 +34,17 @@ while True:
dane = plik_odczyt.read()
sg.easy_print(dane)
if event =="OBRAZ":
pliczek = values['input']
if pliczek:
if pliczek[-3:] == 'png':
obrazek = Obraz(pliczek)
if obrazek.load_image():
obrazek.show_image()
obrazek.transform_smoothing()
obrazek.show_image_other()
if event == "Ok":
sg.easy_print(f"{values=}")