Skip to content

wangzhiwei/PicFactory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Image Factory - Image Stitching Tool

πŸ–ΌοΈ A powerful and user-friendly image stitching tool built with pure HTML, CSS, and JavaScript.

Features

🌐 Multi-language Support

  • English and Chinese interface
  • Automatic language preference saving
  • Default language: English

πŸ“€ Image Upload

  • Drag and drop support
  • Multiple image selection (up to 20 images)
  • File size validation (max 5MB per image)
  • Support for common image formats (PNG, JPEG, GIF, WebP)
  • Real-time thumbnail grid display
  • Drag to reorder images

🎨 Layout Options

  • Horizontal Stitching: Arrange images in a single row
  • Vertical Stitching: Stack images in a single column
  • Grid Layout: Organize images in customizable rows and columns (1-10)

βš™οΈ Customization Settings

  • Image Spacing: Adjustable spacing between images (0-50px)
  • Background Colors: Transparent, white, black, light gray, or custom colors
  • Image Size Options:
    • Keep original size
    • Uniform sizing (small/medium/large)
    • Custom dimensions with width/height input (default 850Γ—600)
    • Quick size presets
  • Alignment: Center, left, or right alignment options
  • Grid Settings: Custom row and column configuration

🎨 Image Style Effects

  • Border Radius: Adjustable corner rounding (0-50px)
  • Shadow Effects:
    • Adjustable shadow distance (0-30px)
    • Custom shadow color
    • Shadow opacity control (0-100%)
    • Shadow angle adjustment (0-360Β°)
  • Border Effects:
    • Customizable border width (0-20px)
    • Custom border color

βœ‚οΈ Image Cropping & Output

  • Output Modes:
    • Stitched Image: Export the complete stitched composition
    • Single Image: Export individual images with effects applied
  • Interactive Cropping: Click and drag to select crop areas in single image mode
  • Real-time Crop Info: Display crop area dimensions
  • Reset Functionality: Restore images to original state

πŸ’Ύ Export Options

  • Format Support: PNG (lossless) and JPEG (compressed)
  • Quality Control: Adjustable JPEG quality (10-100%)
  • Smart Canvas: Automatic canvas sizing based on content and effects
  • One-click Download: Generate and download processed images

πŸ‘οΈ Real-time Preview

  • Live preview of stitched images
  • Instant updates when settings change
  • Responsive canvas display
  • Session storage for preserving work state

Usage Guide

1. Upload Images

  • Click the upload area to select files or drag and drop images
  • Support multiple image selection
  • View all uploaded images in the thumbnail grid

2. Arrange Images

  • Drag thumbnails to reorder images
  • Click the "Γ—" button on thumbnails to remove individual images
  • Use "Clear All Images" to remove all images at once

3. Configure Layout

  • Choose stitching mode: horizontal, vertical, or grid
  • Set row and column numbers for grid mode
  • Adjust spacing, background color, alignment, and other parameters

4. Apply Effects

  • Add border radius for rounded corners
  • Configure shadow effects with distance, color, and opacity
  • Add border outlines with custom width and color

5. Preview and Export

  • View real-time preview in the preview area
  • Choose output mode (stitched or single image)
  • Select output format and quality
  • Download your creation with one click

Technical Specifications

  • Framework: Pure HTML5, CSS3, and JavaScript (ES6+)
  • Canvas API: For image processing and rendering
  • Local Storage: Session storage for preserving work state
  • Responsive Design: Works on desktop and tablet devices
  • Browser Compatibility: Modern browsers with Canvas support
  • Performance: Optimized memory management and UI responsiveness

Browser Requirements

  • βœ… Chrome 60+
  • βœ… Firefox 55+
  • βœ… Safari 11+
  • βœ… Edge 79+
  • ❌ Internet Explorer (not supported)

Usage Limitations

  • Maximum file size per image: 5MB
  • Maximum number of images: 20
  • Large image processing may consume significant memory
  • Frontend-only implementation cannot validate image content security

Quick Start

  1. Download or clone this project
  2. Open index.html in your web browser
  3. Start uploading and stitching images!

Demo Images

The project includes 4 SVG demo images (demo-image-1.svg to demo-image-4.svg) for quick testing:

  • demo-image-1.svg: 300Γ—200, gradient background + circle
  • demo-image-2.svg: 250Γ—250, radial gradient + diamond
  • demo-image-3.svg: 400Γ—150, vertical gradient + rounded rectangle
  • demo-image-4.svg: 200Γ—300, horizontal gradient + ellipse

Step-by-Step Guide

  1. Upload Images: Drag demo images or your own images to the upload area
  2. Arrange Order: Drag thumbnails to adjust image sequence
  3. Select Layout: Choose horizontal, vertical, or grid layout mode
  4. Adjust Parameters: Set spacing, background color, alignment, etc.
  5. Apply Effects: Add shadows, borders, and rounded corners
  6. Preview Results: View real-time stitching effects in preview area
  7. Download Images: Select format and quality, then download results

Development

Built with Trae AI

πŸ€– Powered by Trae AI - This entire project was created using Trae AI, the world's best IDE for AI-powered development. Trae AI provided:

  • Intelligent Code Completion: Advanced AI-powered code suggestions and auto-completion
  • Real-time Error Detection: Instant debugging and error correction
  • Automated Code Optimization: Performance improvements and best practice recommendations
  • Seamless Technology Integration: Effortless integration of modern web technologies
  • Advanced AI Assistance: Complex image processing algorithms and Canvas API implementation
  • Multi-language Support: Intelligent internationalization and localization features
  • UI/UX Enhancement: AI-driven interface design and user experience optimization

Trae AI's advanced coding assistance enabled the creation of sophisticated features like:

  • Complex image processing and Canvas manipulation
  • Real-time preview with multiple layout algorithms
  • Advanced shadow and effect rendering systems
  • Intuitive drag-and-drop interfaces
  • Responsive design with cross-browser compatibility
  • Efficient memory management for large image processing

File Structure

image-factory/
β”œβ”€β”€ index.html              # Main application file (complete standalone app)
β”œβ”€β”€ README.md              # This documentation
β”œβ”€β”€ demo-image-1.svg       # Demo image 1 (300Γ—200)
β”œβ”€β”€ demo-image-2.svg       # Demo image 2 (250Γ—250)
β”œβ”€β”€ demo-image-3.svg       # Demo image 3 (400Γ—150)
└── demo-image-4.svg       # Demo image 4 (200Γ—300)

Version History

v1.3.0

  • 🌐 Multi-language Support: Added English and Chinese interface switching
  • 🎯 Language Persistence: Automatic language preference saving
  • πŸ”§ UI Improvements: Enhanced user interface with language selector
  • πŸ“ Documentation: Complete English README with Trae AI development notes

v1.2.0

  • 🎯 Custom Output Dimensions: Support for specific width/height input (default 850Γ—600)
  • πŸ“ Quick Size Presets: Common size quick selection buttons
  • πŸ–ΌοΈ Single Image Output Mode: Individual image preview and export
  • βœ‚οΈ Interactive Cropping: Mouse selection cropping functionality
  • πŸ“Š Real-time Crop Info: Live crop area dimension display
  • πŸ”§ Download Optimization: Improved download logic and stability
  • πŸ’« UI Enhancements: New output mode selector and improved control panel

v1.1.0

  • ✨ Image Style Effects: Comprehensive visual effects system
  • 🎨 Border Radius: Adjustable corner rounding (0-50px)
  • 🌟 Shadow Effects: Distance, color, and opacity controls
  • πŸ–ΌοΈ Border Effects: Customizable width and color
  • πŸ”§ Smart Canvas Sizing: Automatic canvas adjustment for effects
  • πŸ’« Enhanced UI: New image style settings panel
  • 🎯 Real-time Preview: All effects support live preview and combinations

v1.0.0

  • πŸŽ‰ Initial Release: Core image stitching functionality
  • πŸ“€ Multi-image Upload: Drag and drop with reordering
  • 🎨 Three Layout Modes: Horizontal, vertical, and grid layouts
  • βš™οΈ Rich Customization: Comprehensive settings options
  • πŸ’Ύ Multiple Formats: PNG/JPEG export support
  • πŸ”„ Real-time Preview: Live stitching preview
  • πŸ’Ύ Session Storage: Work state preservation

License

This project is open source and available under the MIT License.

Contributing

Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.

Disclaimer

This tool is for educational and personal use only. Please ensure you have the right to use any uploaded image content. The developer assumes no responsibility for user-uploaded content.


Created with ❀️ using Trae AI - The World's Best AI-Powered IDE πŸ€–βœ¨

Experience the future of development with Trae AI's intelligent coding assistance!

About

A powerful and user-friendly image stitching tool built with pure HTML, CSS, and JavaScript.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages