English | 简体中文
This project is a PySide6-based image mosaic tool that supports rectangular area selection via mouse drag and one-click mosaic processing, perfect for quickly handling sensitive information in images.
- Support for image upload and display
- Mouse drag rectangular area selection
- One-click mosaic processing for selected areas
- Clear image functionality with history reset
- Image saving functionality
- Clean and intuitive interface
- Install dependencies
pip install -r requirements.txt- Run the main program
python main.pyUse the interactive build script:
python build.pyThis will guide you through:
- Target architecture selection
- Build mode (onedir/onefile) selection
- Platform-specific packaging options
For onedir build (generates folder with multiple files):
pyinstaller --onedir --name "RectangularMosaic" --add-data "assets;assets" --add-data "src/localization/translations;src/localization/translations" --icon="assets/icon.ico" --noconsole main.pyFor onefile build (generates single executable):
pyinstaller --onefile --name "RectangularMosaic" --add-data "assets;assets" --add-data "src/localization/translations;src/localization/translations" --icon="assets/icon.ico" --noconsole main.pyThe built executable will be in the dist/ directory.
/src
/features
edit_history.py # Edit history management
file_manager.py # File operations
image_loader.py # Image loading and saving
image_mosaic.py # Mosaic processing logic
/gui
about_dialog.py # About dialog
image_viewer.py # Image display component
main_window.py # Main application window
menu_bar.py # Application menu bar
status_bar.py # Status bar component
theme_manager.py # UI theme management
ui_components.py # UI components
ui_state_manager.py # UI state management
/localization
translations/ # Multi-language translation files
translator.py # Translation management
/utils
rect_selector.py # Selection tool
selectable_label.py # Selectable label component
/constants
config.py # Configuration constants
main.py # Startup entry point
requirements.txt # Dependencies file
.gitignore # Git ignore file
README.md # Project documentation
- After starting the program, click "Upload Image" to select a local image.
- Drag the mouse on the image to select the area that needs mosaic processing.
- Click the "Apply Mosaic" button to apply mosaic processing to the selected area.
- To clear the current image and reset all history, click the "Clear Image" button.
- To save the processed image, click the "Save Image" button.
- High cohesion and low coupling, modular design for easy maintenance and extension
- Detailed Chinese comments for each module, function, and class
- Clear directory structure for easy navigation and management
- Python 3.7 or higher
- PySide6 6.5.0 or higher
For suggestions or issues, please submit an issue or PR.
- Join our QQ group for discussion: SK Open Source Discussion Group
- Join our Discord server: SK Open Source Community