removing test message

This commit is contained in:
vb
2025-10-25 23:32:37 +02:00
parent 2e5bda4531
commit b417803472
4 changed files with 4 additions and 8 deletions

View File

@@ -189,11 +189,9 @@ class GUI:
self._selectionMode = not self._selectionMode self._selectionMode = not self._selectionMode
if self._selectionMode: if self._selectionMode:
self._root.config(cursor="crosshair") 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: else:
self._root.config(cursor="") self._root.config(cursor="")
self._clearSelection() self._clearSelection()
messagebox.showinfo("Selection Mode", "Selection mode disabled.")
def _onMouseClick(self, event) -> None: def _onMouseClick(self, event) -> None:
"""Handle mouse click for selection.""" """Handle mouse click for selection."""
@@ -243,7 +241,6 @@ class GUI:
selection_coords["left"], selection_coords["top"], selection_coords["left"], selection_coords["top"],
selection_coords["right"], selection_coords["bottom"] selection_coords["right"], selection_coords["bottom"]
) )
messagebox.showinfo("Selection", "Area selected! Right-click for manipulation options.")
def _onRightClick(self, event) -> None: def _onRightClick(self, event) -> None:
"""Handle right-click to show context menu for manipulation options.""" """Handle right-click to show context menu for manipulation options."""

View File

@@ -14,7 +14,7 @@ class ImageContainer:
imgcv2 = cv2.imread(path) imgcv2 = cv2.imread(path)
height, width, channels = imgcv2.shape height, width, channels = imgcv2.shape
# Open and resize image (optional) # Open and resize image
self._imageData = Image.open(path) self._imageData = Image.open(path)
# PIL expects (width, height) # PIL expects (width, height)
self._imageData = self._imageData.resize((width, height), Image.LANCZOS) 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.""" """Push a copy of current image to history for undo."""
if self._imageData is None: if self._imageData is None:
return 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()) 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: if len(self._history) > 20:
self._history.pop(0) self._history.pop(0)

View File

@@ -38,7 +38,6 @@ class CropImage(ImageManipulation):
right = left + crop_width right = left + crop_width
bottom = top + crop_height bottom = top + crop_height
else: else:
# Default: trim margins similar to demo in root main.py
img_width, img_height = pil_image.size img_width, img_height = pil_image.size
left = 80 left = 80
top = 80 top = 80

View File

@@ -10,7 +10,7 @@ class FlipImage(ImageManipulation):
return "Flip" return "Flip"
def getParameters(self) -> List[str]: def getParameters(self) -> List[str]:
return ["mode"] # horizontal|vertical return ["mode"]
def manipulateImage(self, image: ImageContainer, parameters: Any) -> None: def manipulateImage(self, image: ImageContainer, parameters: Any) -> None:
if image is None or image.getImage() is None: if image is None or image.getImage() is None: