removing test message
This commit is contained in:
@@ -189,11 +189,9 @@ class GUI:
|
||||
self._selectionMode = not self._selectionMode
|
||||
if self._selectionMode:
|
||||
self._root.config(cursor="crosshair")
|
||||
messagebox.showinfo("Selection Mode", "Selection mode enabled. Click and drag to select area, then right-click for manipulation options.")
|
||||
else:
|
||||
self._root.config(cursor="")
|
||||
self._clearSelection()
|
||||
messagebox.showinfo("Selection Mode", "Selection mode disabled.")
|
||||
|
||||
def _onMouseClick(self, event) -> None:
|
||||
"""Handle mouse click for selection."""
|
||||
@@ -243,7 +241,6 @@ class GUI:
|
||||
selection_coords["left"], selection_coords["top"],
|
||||
selection_coords["right"], selection_coords["bottom"]
|
||||
)
|
||||
messagebox.showinfo("Selection", "Area selected! Right-click for manipulation options.")
|
||||
|
||||
def _onRightClick(self, event) -> None:
|
||||
"""Handle right-click to show context menu for manipulation options."""
|
||||
|
||||
@@ -14,7 +14,7 @@ class ImageContainer:
|
||||
imgcv2 = cv2.imread(path)
|
||||
height, width, channels = imgcv2.shape
|
||||
|
||||
# Open and resize image (optional)
|
||||
# Open and resize image
|
||||
self._imageData = Image.open(path)
|
||||
# PIL expects (width, height)
|
||||
self._imageData = self._imageData.resize((width, height), Image.LANCZOS)
|
||||
@@ -39,9 +39,9 @@ class ImageContainer:
|
||||
"""Push a copy of current image to history for undo."""
|
||||
if self._imageData is None:
|
||||
return
|
||||
# Ensure a deep copy (PIL copy is sufficient)
|
||||
# Ensure a deep copy (but PIL copy should be sufficient)
|
||||
self._history.append(self._imageData.copy())
|
||||
# Cap history size to avoid memory blow-up
|
||||
# Cap history size to avoid memory blow up
|
||||
if len(self._history) > 20:
|
||||
self._history.pop(0)
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@ class CropImage(ImageManipulation):
|
||||
right = left + crop_width
|
||||
bottom = top + crop_height
|
||||
else:
|
||||
# Default: trim margins similar to demo in root main.py
|
||||
img_width, img_height = pil_image.size
|
||||
left = 80
|
||||
top = 80
|
||||
|
||||
@@ -10,7 +10,7 @@ class FlipImage(ImageManipulation):
|
||||
return "Flip"
|
||||
|
||||
def getParameters(self) -> List[str]:
|
||||
return ["mode"] # horizontal|vertical
|
||||
return ["mode"]
|
||||
|
||||
def manipulateImage(self, image: ImageContainer, parameters: Any) -> None:
|
||||
if image is None or image.getImage() is None:
|
||||
|
||||
Reference in New Issue
Block a user