snapchat filter test

This commit is contained in:
Moira Daniella sebastian
2025-11-03 16:33:54 +01:00
parent b1f9d0d8c1
commit e29adebd4e
11 changed files with 33776 additions and 5 deletions

View File

@@ -5,7 +5,6 @@ from ImageContainer import ImageContainer
from ImageManipulation.ManipulationList import *
from functools import partial
class GUI:
"""The GUI class responsible for the main application GUI.
@@ -46,6 +45,7 @@ class GUI:
file_menu = tk.Menu(menu, tearoff=0)
menu.add_cascade(label="File", menu=file_menu)
file_menu.add_command(label="Open Image", command=lambda: self._openImage())
file_menu.add_command(label="Open Camera", command=lambda: self._openCamera())
file_menu.add_command(label="Save Image", command=lambda: self._saveImage())
file_menu.add_command(label="Exit", command=root.quit)
@@ -83,9 +83,6 @@ class GUI:
# manual_menu.add_command(label="Histogram Threshold", command=partial(self._applyManipulation, HistogramThreshold()))
edit_menu = tk.Menu(menu, tearoff=0)
menu.add_cascade(label="Edit", menu=edit_menu)
edit_menu.add_command(label="Undo", accelerator="Ctrl+Z", command=lambda: self._undo())
# Frame to hold image
imgframe = tk.Frame(root, width=500, height=500, bg="lightgray", relief="sunken", bd=2)
@@ -148,4 +145,8 @@ class GUI:
if self._currentImage is None:
return
self._currentImage.undo()
self._renderCurrentImage()
self._renderCurrentImage()
def _openCamera(self):
camera = CameraWindow()
camera.run(self)