A lightweight image compression tool built with Avalonia UI. SquashPicture optimizes PNG and JPEG images using lossless compression techniques while preserving image quality.
- Lossless Compression - Reduces file size without losing image quality
- PNG Optimization - Uses quantization and optimal compression settings
- JPEG Optimization - Strips metadata and optimizes Huffman tables
- Batch Processing - Compress multiple images simultaneously
- System Tray - Minimizes to system tray instead of closing
- Dark Mode - Modern dark theme UI
- Cross-Platform - Runs on Linux (Windows and macOS support planned)
| Shortcut | Action |
|---|---|
Alt+A |
Add and compress images |
Alt+R |
Recompress all images |
Alt+C |
Clear file list |
Ctrl+Q |
Close the Window |
- .NET 10.0 SDK or later
# Clone the repository
git clone https://github.com/amuza2/SquashPicture.git
cd SquashPicture
# Build the project
dotnet build
# Run the application
dotnet run --project src/SquashPicture# Linux x64
dotnet publish src/SquashPicture -c Release -r linux-x64 --self-contained -o publish/linux-x64- Add Images - Click "Add" to select images via file dialog
- View Results - The table shows original size, new size, and compression ratio
- Recompress - Click "Recompress" to re-process all images in the list
- Clear - Click "Clear" to remove all images from the list
- PNG (
.png) - JPEG (
.jpg,.jpeg)
- Quantizes colors to 256-color palette with Floyd-Steinberg dithering
- Applies maximum compression level (9)
- Uses optimal compression filter and strategy
- Performs lossless optimization pass
- Strips all metadata (EXIF, ICC profiles, etc.)
- Optimizes Huffman tables
- Converts to progressive JPEG
- Performs lossless optimization
- Creates temporary backup before compression
- Restores original if compressed file is larger
- Ensures no data loss on failure
SquashPicture/
├── src/
│ └── SquashPicture/
│ ├── Assets/ # Icons and resources
│ ├── Compressors/ # PNG and JPEG compressors
│ ├── Converters/ # Value converters for UI
│ ├── Models/ # Data models
│ ├── Services/ # Business logic services
│ ├── Styles/ # XAML style resources
│ ├── ViewModels/ # MVVM view models
│ └── Views/ # XAML views
└── tests/
└── SquashPicture.Tests/ # Unit tests
Settings are stored in:
- Linux:
~/.config/SquashPicture/settings.json
Settings include:
- Window position and size
- Last used directory for file dialogs
- Avalonia UI - Cross-platform UI framework
- Magick.NET - ImageMagick wrapper for .NET
- SixLabors.ImageSharp - Image processing library
- CommunityToolkit.Mvvm - MVVM toolkit
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome!
- Open an issue first to discuss the proposed change
- Fork the repository
- Create a branch for your feature or fix
- Submit a Pull Request referencing the issue
- Icon by Icons8
Made with ❤️ for the Linux community