A comprehensive, user-friendly solution for automated image processing with watermarking and web optimization. Built for Windows 11 with powerful hardware and Azure integration capabilities.
Optimized for Michael J Wright Estate artwork processing:
- ๐ 1200px long edge - Perfect for web gallery display
- ๐จ sRGB color space - Consistent color across devices
- ๐ฑ 72 DPI - Web standard resolution
- ๐ฆ JPEG < 300KB - Fast loading, great quality
- ยฉ Text watermark - "ยฉ Michael J Wright Estate - Property of"
- Multi-format Support: PDF, JPG, JPEG, PNG, BMP, TIFF files
- Text Watermarking: Repeating diagonal text watermark with adjustable transparency
- Image Watermarking: Transparent PNG watermarks with customizable opacity, position, and scaling
- Web Optimization: Automatic resizing to 1200px long edge, sRGB conversion, 72 DPI
- Smart Compression: Targets < 300KB file size with quality optimization
- Batch Processing: Process entire folders with progress tracking
- High Performance: Multi-processing support optimized for powerful hardware
- Modern GUI: Clean, intuitive interface built with CustomTkinter
- Command Line: Powerful CLI for automation and scripting
- HTTP API: RESTful API for Power Platform and cloud integration
- Azure Blob Storage: Cloud-based image processing and storage
- Azure Computer Vision: AI-powered image analysis and text detection
- Power Platform: Ready-to-use Power Automate workflows and Power Apps integration
- Configuration Management: YAML-based settings with presets
- Comprehensive Logging: Detailed logs with rotation and retention
- Error Handling: Robust error recovery and reporting
- Performance Monitoring: Progress tracking and statistics
- OS: Windows 11 Pro/Business (recommended)
- Hardware: Multi-core processor, 8GB+ RAM
- Python: 3.8 or higher
pip install -r requirements.txtKey packages:
- Pillow: Image processing
- OpenCV: Advanced image operations
- PyMuPDF: PDF handling
- CustomTkinter: Modern GUI
- Azure SDK: Cloud integration (optional)
- Flask: HTTP API (optional)
# Clone or download the project
cd ImageProcessorPro
# Install dependencies
pip install -r requirements.txtpython gui_app.pySimply select your folder with paintings/images and click "Start Processing". Output will be saved to a web_optimized subfolder.
# Quick web optimization (uses MJW Estate defaults)
python cli.py -i "paintings_folder"
# Custom watermark text
python cli.py -i "photos" --watermark-text "ยฉ My Custom Text"
# Advanced options
python cli.py -i "photos" --long-edge 1500 --quality 85 --text-opacity 30# Start the API server
python power_platform/power_platform_integration.pyThe system supports YAML configuration files for easy preset management:
# Use a specific config file
python cli.py --config config/web_optimization_config.yaml
# Generate a new config template
python cli.py --generate-config my_settings.yamldefault_config.yaml: Balanced quality and performancehigh_quality_config.yaml: Maximum quality for important imagesweb_optimized_config.yaml: Fast processing for web use
# Image Quality
jpeg_quality: 85 # 1-100 (higher = better quality, larger files)
output_format: "JPEG" # JPEG, PNG, WEBP
# Watermark
watermark_opacity: 0.3 # 0.1-1.0 (transparency level)
watermark_position: "bottom-right" # Placement on image
watermark_scale: 0.2 # Size relative to image (0.05-0.5)
# Dimensions
max_width: 1920 # Maximum output width
max_height: 1080 # Maximum output heightPre-built templates for:
- Email Processing: Process attachments from emails
- SharePoint Integration: Automatic folder monitoring
- OneDrive Batch: Scheduled bulk processing
Templates available in power_platform/templates/
- Custom connector setup
- Mobile-friendly image capture
- Batch processing interface
- Integration formulas provided
POST /api/process-image: Upload and process filesPOST /api/process-base64: Process base64 images (Power Apps)POST /api/process-batch: Batch processingGET /api/health: Health check
- Blob Storage: For cloud image storage
- Computer Vision: For AI analysis (optional)
# Copy template and add your credentials
cp azure/azure_config_template.json azure/azure_config.json- Cloud-based batch processing
- Automatic image analysis and tagging
- OCR text detection
- Scalable storage solutions
- Launch: Run
python gui_app.py - Configure: Set input/output folders and watermark
- Adjust Settings: Quality, opacity, dimensions
- Scan: Check how many files will be processed
- Process: Start the batch operation
- Monitor: Watch progress and results
- Presets: Save and load common configurations
- Preview: Scan folders before processing
- Progress Tracking: Real-time processing updates
- Error Reporting: Detailed failure information
# Simple processing
python cli.py -i "C:\Photos" -o "C:\WebPhotos" -w "logo.png"
# Custom quality and format
python cli.py -i input -o output -w watermark.png --quality 90 --format WEBP
# Use configuration file
python cli.py --config config/high_quality_config.yaml
# Dry run (see what would be processed)
python cli.py -i input -o output --dry-run# Custom dimensions
python cli.py -i input -o output --max-width 2560 --max-height 1440
# Watermark customization
python cli.py -i input -o output --opacity 0.5 --position center --scale 0.3
# Performance tuning
python cli.py -i input -o output --max-workers 8 --no-multiprocessing- Check input folder path
- Verify supported formats: PDF, JPG, PNG, BMP, TIFF
- Ensure files aren't corrupted
- Verify watermark file exists and is PNG format
- Check watermark path in configuration
- Ensure watermark has transparency
- Check available disk space
- Verify write permissions to output folder
- Review logs in
logs/folder
- Reduce
max_workersif system becomes unresponsive - Use SSD storage for better I/O performance
- Increase available RAM
Detailed logs are stored in logs/image_processor_{timestamp}.log
- Run directly with Python
- Use virtual environments for isolation
Convert to a Windows service for background processing:
# Install service dependencies
pip install pywin32
# Create service wrapper (example in deployment/)# See deployment/Dockerfile for complete setup
FROM python:3.11-slim
COPY requirements.txt .
RUN pip install -r requirements.txtDeploy API endpoints as serverless functions for scalable cloud processing.
- Input validation for all file types
- Size limits to prevent memory issues
- Sandboxed processing environment
- Authentication headers
- Rate limiting
- Input sanitization
- HTTPS enforcement
- Managed identities for authentication
- Private endpoints for storage
- Key Vault for secret management
- CPU: Utilizes all available cores with multiprocessing
- Memory: Efficient image handling with streaming
- Storage: SSD recommended for faster I/O
- Use WEBP format for best compression
- Batch similar-sized images together
- Consider GPU acceleration for large volumes
- Azure cloud processing for unlimited scale
- Load balancing for API endpoints
- Distributed storage for large datasets
ImageProcessorMJWProject/
โโโ src/ # Core processing logic
โโโ gui_app.py # GUI application
โโโ cli.py # Command line interface
โโโ config/ # Configuration presets
โโโ azure/ # Azure integration
โโโ power_platform/ # Power Platform templates
โโโ watermarks/ # Watermark images
โโโ logs/ # Application logs
โโโ requirements.txt # Dependencies
- Extend
ImageProcessorclass for new functionality - Add new configuration options to
ProcessingConfig - Create custom GUI tabs for advanced features
# Run with test images
python cli.py -i test_images -o test_output --dry-run
# Check processing quality
python -c "from src.image_processor import ImageProcessor; ..."- Batch watermarking for client galleries
- Web optimization for online portfolios
- Automated copyright protection
- Product image standardization
- Watermarking for brand protection
- Multi-format output for different platforms
- Social media image preparation
- Client asset management
- Brand compliance automation
- Document processing workflows
- SharePoint integration
- Automated archival systems
config = ProcessingConfig(
input_folder="input",
output_folder="output",
watermark_path="logo.png",
jpeg_quality=85,
watermark_opacity=0.3,
max_width=1920,
max_height=1080,
output_format="JPEG"
)processor = ImageProcessor(config)
results = processor.process_folder()POST /api/process-image: Multipart file uploadPOST /api/process-base64: JSON with base64 imageGET /api/config: Get current configurationPOST /api/config: Update configuration
- Fork the repository
- Create feature branch
- Install development dependencies
- Run tests before submitting
- Follow PEP 8 conventions
- Add type hints for all functions
- Include comprehensive docstrings
- Write unit tests for new features
This project is provided as-is for educational and commercial use. Please ensure you have proper rights to any watermark images used.
- Check this README for common solutions
- Review configuration examples
- Examine log files for error details
- Report issues with detailed error information
- Include system specifications and log excerpts
- Provide sample images (without sensitive content)
Built with โค๏ธ for automated image processing workflows