diff --git a/src/GUI.py b/src/GUI.py index c20ec3a..d52d55c 100644 --- a/src/GUI.py +++ b/src/GUI.py @@ -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.""" diff --git a/src/ImageContainer.py b/src/ImageContainer.py index 9004d99..5622276 100644 --- a/src/ImageContainer.py +++ b/src/ImageContainer.py @@ -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) diff --git a/src/ImageManipulation/CropImage.py b/src/ImageManipulation/CropImage.py index 18d25cf..7a548e1 100644 --- a/src/ImageManipulation/CropImage.py +++ b/src/ImageManipulation/CropImage.py @@ -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 diff --git a/src/ImageManipulation/FlipImage.py b/src/ImageManipulation/FlipImage.py index c78cdc8..6ac1143 100644 --- a/src/ImageManipulation/FlipImage.py +++ b/src/ImageManipulation/FlipImage.py @@ -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: