cv
This commit is contained in:
@@ -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=}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user