Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
# Image Zoomer A powerful Python image viewing and editing tool with advanced overlay capabilities, precision grid system, comprehensive zoom controls, and precise rotation. ## Features ### 🖼️ **Image Viewing & Manipulation** - **Multi-format support**: PNG, JPEG, GIF, BMP, TIFF, WebP - **Zoom controls**: Mouse wheel, keyboard, slider (0.5x to 3x) - **Transform operations**: Flip horizontal/vertical, rotate 90°, precision 1° rotation - **Custom sizing**: Resize images or use presets (7x7 inches @ 72 DPI) - **Custom icon**: Distinctive icon for system integration ### 🎯 **Overlay System** - **Load overlay images** with transparency control - **Proportional scaling** - overlay scales with base image during zoom - **Independent resize** - Precise 2-pixel adjustments via keyboard - **Drag positioning** - Move overlays with mouse - **Visual feedback** - Red border when in edit mode ### 📐 **Advanced Grid System** - **Customizable grid** with adjustable intervals - **Grid rotation** - Rotate grid around any point (3° increments) - **Grid positioning** - Move grid independently of image - **Rotation center** - Click anywhere to set rotation point - **Visual indicators** - Live position display (x, y, rotation°) ### 🎮 **Multiple Interaction Modes** - **Normal Mode**: Pan and zoom - **Grid Move Mode**: Manipulate grid position and rotation - **Overlay Edit Mode**: Move and resize overlays - **Base Move Mode**: Reposition base image ### 🖥️ **System Integration** - **Context menu integration**: Right-click any image → "Open with Image Zoomer" - **Custom application icon**: Appears in file managers and taskbars - **Command line support**: Launch directly with image files ## Installation ### Requirements ```bash pip install tkinter pillow ``` ### Clone & Run ```bash git clone https://github.com/yourusername/image-zoomer.git cd image-zoomer python image_zoomer_08.py ``` ### Ubuntu Integration Setup ```bash # Make script executable chmod +x image_zoomer_08.py # Create desktop entry (replace paths with your actual paths) cat > ~/.local/share/applications/image-zoomer.desktop << EOF [Desktop Entry] Name=Image Zoomer Comment=Image viewer with zoom and grid overlay Exec=python3 /path/to/image_zoomer_08.py %f Icon=/path/to/image_zoomer_icon.png Terminal=false Type=Application Categories=Graphics;Photography;Viewer; MimeType=image/png;image/jpeg;image/jpg;image/gif;image/bmp;image/tiff;image/webp; EOF # Update desktop database update-desktop-database ~/.local/share/applications/ ``` ## Quick Start 1. **Launch** the application or right-click an image and select "Image Zoomer" 2. **Select an image** from the file dialog (if launched standalone) 3. **Use mouse wheel** to zoom in/out 4. **Press F7** to toggle grid visibility 5. **Load an overlay** (Ctrl+L) for image comparison ## Controls Reference ### 🎹 **Keyboard Shortcuts** | Key | Action | |-----|--------| | **File Operations** | | `Ctrl+O` | Open base image | | `Ctrl+L` | Load overlay image | | `Ctrl+S` | Save settings | | `Esc` | Exit application | | **Zoom & View** | | `Left/Right Arrows` | Zoom out/in (when grid move OFF) | | `F6` | Fit image to window | | `F5` | Reset image to original | | **Transform** | | `F1` | Flip horizontal | | `F2` | Flip vertical | | `F3` | Rotate clockwise 90° | | `F4` | Rotate counter-clockwise 90° | | `Ctrl+Right` | Rotate clockwise 1° | | `Ctrl+Left` | Rotate counter-clockwise 1° | | **Grid Controls** | | `F7` | Toggle grid visibility | | `F8` | Toggle grid move mode | | `F9` | Reset grid position/rotation | | `Up/Down` | Move grid up/down (grid move mode) | | `Shift+Left/Right` | Move grid left/right | | `Shift+Up/Down` | Rotate grid CCW/CW (3°) | | **Mode Toggles** | | `O` | Toggle overlay edit mode | | `B` | Toggle base image move mode | | **Overlay Resize** | | `Ctrl+Shift++` | Increase overlay size (+2px) | | `Ctrl+Shift+-` | Decrease overlay size (-2px) | ### 🖱️ **Mouse Controls** | Action | Function | |--------|----------| | **Click** | Set grid rotation center | | **Scroll wheel** | Zoom in/out (proportional scaling) | | **Drag** | Pan image (normal mode) | | **Drag** | Move grid (grid move mode) | | **Drag overlay** | Move overlay (overlay edit mode) | | **Drag base** | Move base image (base move mode) | ### 📋 **Menu System** #### **File** - Open/Load images, Remove overlay, Reset positions, Save/Load settings, Exit #### **View** - Fit to window, Reset image, Grid controls #### **Transform** - Flip operations, 90° rotation controls, 1° precision rotation #### **Mode** - Toggle between different interaction modes #### **Overlay** - Overlay management and resize controls #### **Tools** - Copy zoom level, Keyboard shortcuts help ## Usage Examples ### Basic Image Viewing ```python # Load and view an image python image_zoomer_08.py # Or right-click image → "Open with Image Zoomer" # Use mouse wheel to zoom # Press F6 to fit to window ``` ### Precision Rotation ```python # For precise alignment: # 1. Use Ctrl+Left/Right for 1° adjustments # 2. Use F3/F4 for 90° rotations # 3. Image rotates around center point # 4. Press F5 to reset to original ``` ### Overlay Comparison ```python # 1. Load base image (Ctrl+O) # 2. Load overlay image (Ctrl+L) # 3. Press 'O' to enter overlay edit mode # 4. Drag overlay to position # 5. Use Ctrl+Shift+Plus/Minus to resize # 6. Adjust transparency with slider ``` ### Grid Alignment ```python # 1. Press F7 to show grid # 2. Press F8 to enter grid move mode # 3. Use arrow keys to position grid # 4. Use Shift+Up/Down to rotate grid # 5. Click anywhere to set rotation center # 6. Press F9 to reset grid ``` ### Settings Persistence ```python # Settings auto-save per image: # - Grid position and rotation # - Zoom level and image size # - Overlay settings # - Base image position # Press Ctrl+S to manually save ``` ## Status Indicators The status bar shows: - **Grid Position**: `Grid: (x,y,rotation°)` - **Mode Indicators**: - `Grid Move: ON/OFF` - `Edit Overlay: ON/OFF` - `Move Base: ON/OFF` ## Technical Details ### Dependencies - **Python 3.6+** - **tkinter** (usually included with Python) - **PIL/Pillow** for image processing ### Supported Formats - PNG, JPEG/JPG, GIF, BMP, TIFF/TIF, WebP ### Performance - Efficient image scaling with PIL/Pillow - Real-time grid rendering - Smooth zoom and pan operations - Precision rotation with center-point pivot ### Settings Storage - Auto-saves settings per image as `.settings.json` files - Persistent zoom, grid position, overlay state - Manual save with Ctrl+S ## Icon & Integration The application includes a custom SVG icon featuring: - Image frame with grid overlay - Magnifying glass for zoom functionality - Clean design that scales well at different sizes Icon formats provided: - SVG (vector, scales to any size) - PNG (16x16, 32x32, 48x48) - ICO (Windows compatibility) ## Contributing 1. Fork the repository 2. Create a feature branch (`git checkout -b feature/amazing-feature`) 3. Commit your changes (`git commit -m 'Add amazing feature'`) 4. Push to the branch (`git push origin feature/amazing-feature`) 5. Open a Pull Request ## License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. ## Changelog ### v0.8 (Latest) - ✅ Added 1° precision rotation (Ctrl+Left/Right) - ✅ Custom application icon with system integration - ✅ Ubuntu context menu support ("Open with") - ✅ Settings persistence per image - ✅ Command line argument support - ✅ Improved rotation around center point ### v0.7 - Enhanced overlay system - Settings save/load functionality - Base image positioning ### v0.6 - Replaced problematic corner drag with keyboard resize - Added proportional overlay scaling with zoom - Comprehensive menu system - Enhanced file format support ### v0.5 - Grid rotation system - Multiple interaction modes - Overlay transparency controls ### v0.4 - Overlay support - Transform operations - Custom sizing ## Support If you encounter any issues or have questions: 1. Check the **Tools** → **Keyboard Shortcuts** menu for help 2. Review this README 3. Create an issue on GitHub --- **Made for precision image analysis and comparison workflows**