Give wings to pixels ๐ชฝ
A powerful image processing and analysis tool built with Electron and Sharp, featuring an intuitive multi-panel interface for batch image operations.
- Features
- Requirements
- Installation
- Development
- Project Structure
- Usage
- Supported Formats
- Architecture
- License
- Horizontal scrollable image panels for easy navigation
- Multi-select support: Select multiple images using
Ctrl + Click - Batch operations: Apply transformations to multiple images at once
- Drag & drop: Load images directly into panels
- Live preview: See changes in real-time
- Resize: Scale images by percentage or pixel width
- Crop: Interactive cropping with visual feedback
- Rotate: Arbitrary angles or quick 90ยฐ rotations
- Flip/Flop: Mirror images horizontally or vertically
- Filters: Blur, sharpen, median, dilate, erode, normalize
- Color: Grayscale, negative, tint, threshold
- Watermark: Composite images with transparency
- Paint: Draw directly on images with adjustable brush
- Animated GIF support with playback controls
- Color picker: Extract colors from images
- Undo/Redo: Full history for each image layer
- Format conversion: Convert between 13+ image formats
- Keyboard shortcuts: Fast workflow with hotkeys
- Node.js: v22.18.0 or higher
- IDE: Visual Studio Code (recommended)
- Platform: Windows, macOS, or Linux
- Download and install
Pegasus Setup.exefrom releases - No additional dependencies required
- Clone the repository
git clone https://github.com/Pascal-Institute/pegasus.git
cd pegasus- Install dependencies
npm install- Rebuild native modules
npm run rebuildSimply download and run the installer for your platform from the Releases page.
Windows:
npm startLinux:
electron . --ozone-platform=x11npm run buildThis creates installers in the output/ directory.
npm run build:win-storepegasus/
โโโ core/ # Core image rendering engine
โ โโโ image_renderer.js # Main UI renderer and panel manager
โ โโโ image_layer.js # Individual image panel component
โ โโโ pix.js # Custom .pix format handler
โ
โโโ features/ # Feature modules
โ โโโ image_mode.js # Interaction mode system (crop, draw, etc.)
โ โโโ image_layer_events.js # Event handlers for panels
โ โโโ layer_history.js # Undo/redo implementation
โ โโโ gif_animation.js # Animated GIF playback
โ
โโโ processing/ # Image processing logic
โ โโโ image_processor.js # Main processing operations
โ โโโ image_loader.js # File loading and validation
โ โโโ format_converter.js # Format conversion utilities
โ
โโโ renderer/ # UI renderers for each panel
โ โโโ main_renderer.js # Main application renderer
โ โโโ resize_renderer.js
โ โโโ crop_renderer.js
โ โโโ filter_renderer.js
โ โโโ rotate_renderer.js
โ โโโ paint_renderer.js
โ โโโ image_analysis_renderer.js
โ
โโโ pages/ # HTML panel templates
โโโ css/ # Stylesheets
โโโ components/ # Reusable UI components
โโโ utils/ # Utility functions
โ โโโ ipc_bridge.js # IPC communication bridge
โ โโโ ui_loader.js # Dynamic UI component loader
โ
โโโ main.js # Electron main process
โโโ image_kit.js # Public API exports
โโโ index.html # Main application window
ImgKitRenderer: Manages the scrollable container and image panelsImageLayer: Represents each individual image with canvas and controls
ImageMode: Defines interaction modes (NORMAL, CROPPING, DRAWING, etc.)ModeManager: Handles mode transitions for each layerLayerHistory: Implements undo/redo stackGifAnimation: Controls animated GIF playback
ImageProcessor: Pure image processing functions using SharpImageLoader: Handles file I/O and format validationFormatConverter: Converts between different image formats
- Load Images: Drag & drop or use
File > Open - Select Tool: Click tool buttons (Resize, Crop, Filter, etc.)
- Apply Operation: Adjust parameters in the panel
- Save:
File > SaveorSave As
| Shortcut | Action |
|---|---|
Ctrl + A |
Select all images |
Ctrl + Z |
Undo |
Ctrl + Y |
Redo |
Alt + M |
Toggle magnifying glass |
Alt + H |
Hide current layer |
F11 |
Toggle fullscreen |
- Select: Click on an image panel
- Add to selection:
Ctrl + Click - Deselect:
Ctrl + Clickon selected panel - Visual Feedback: Selected panels show green border
png, jpg, jpeg, webp, gif, bmp, ico, tiff, tif, svg, avif, heif, heic, pix
- โ Animated GIF: Full playback controls (play, pause, frame navigation)
- โ PIX format: Custom format for lossless editing
- โ ICC profiles: Preserved during conversion
- โ EXIF data: Metadata preservation
See GIF Animation Documentation for animated GIF details.
Main Process (main.js)
โโโ Creates BrowserWindow
โโโ Handles file dialogs
โโโ Manages IPC communication
โโโ Coordinates processing operations
Renderer Process (index.html)
โโโ UI Components (components/)
โโโ Image Panels (core/image_layer.js)
โโโ Event Handlers (features/image_layer_events.js)
โโโ Tool Panels (renderer/*.js)
Processing Worker
โโโ Sharp-based image operations (processing/)
User Action โ Renderer โ IPC โ Main Process โ ImageProcessor โ Sharp โ Result
โ โ
โโโโโโโโโโโโโโโโโ IPC Response โโโโโโโโโโโโโโโโโโโโโโโโโโ
image_kit.js (Entry Point)
โโโ core/image_renderer.js
โ โโโ core/image_layer.js
โ โ โโโ features/image_layer_events.js
โ โ โโโ features/layer_history.js
โ โ โโโ features/gif_animation.js
โ โ โโโ processing/image_processor.js
โ โ โโโ processing/image_loader.js
โ โโโ features/image_mode.js
โโโ processing/image_processor.js
โ โโโ processing/format_converter.js
โโโ features/image_mode.js
- File naming: Use underscores (
resize_panel.js) - Classes: PascalCase (
ImageProcessor) - Functions: camelCase (
processImage) - Constants: UPPER_SNAKE_CASE (
LAYER_EVENT_CHANNEL)
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Follow the coding conventions
- Submit a pull request
See LICENSE file for details.
Built with:
- Electron - Desktop application framework
- Sharp - High-performance image processing
- Color Namer - Color identification
Made with โค๏ธ by Pascal Institute