mimg

mimg is a high-performance command-line image processing tool written in Zig.

Quick Start

Process images with simple commands:

mimg input.png brightness 20 contrast 1.5 -o output.png

Chain multiple effects for powerful transformations:

mimg photo.png sepia vignette 0.5 noise 0.1 -o vintage.png

Features

  • Fast: SIMD-optimized operations for maximum performance
  • 🎨 Powerful: 42+ modifiers with chainable effects
  • 🔧 Simple: Intuitive command-line interface
  • 📦 Portable: Single binary, no dependencies

Available Modifiers

mimg supports 42+ image modifiers organized into categories:

Color Adjustments

  • brightness, contrast, saturation, gamma, exposure
  • hue-shift, vibrance, equalize, colorize
  • grayscale, sepia, invert, duotone

Filters & Effects

  • gaussian-blur, sharpen, edge-detect, edge-enhancement
  • emboss, color-emboss, glow, vignette
  • noise, posterize, pixelate, oil-painting

Transformations

  • rotate, flip, resize, crop
  • round-corners, tilt-shift

Channel Operations

  • adjust-channels, channel-swap, split-channels

Installation

Build from Source

Requirements: Zig 0.15.2 or later

git clone https://github.com/yourusername/mimg.git
cd mimg
zig build
./zig-out/bin/mimg --help

Usage Examples

Basic Color Adjustment:

mimg photo.png brightness 30 saturation 1.2 -o enhanced.png

Artistic Effects:

mimg landscape.png oil-painting 3 glow 0.4 10 -o artistic.png

Vintage Look:

mimg portrait.png sepia contrast 1.1 vignette 0.5 -o vintage.png

Cyberpunk Style:

mimg city.png colorize "#00A8FF" 0.5 glow 0.8 12 edge-enhancement 1.3 -o cyberpunk.png

Gallery

Explore 38 different effects and combinations in our interactive gallery, showcasing the full power of mimg on the classic Lena test image.

Performance

mimg leverages SIMD instructions and efficient memory management for high-performance image processing:

  • Batch processing support
  • Multi-threaded operations
  • Zero-copy architecture where possible
  • Optimized for modern CPUs

File Format Support

  • Input: PNG, JPEG, BMP, GIF, TIFF
  • Output: PNG, JPEG, BMP

Contributing

Contributions welcome! Check out the GitHub repository to:

  • Report bugs
  • Suggest features
  • Submit pull requests

License

MIT License - see LICENSE file for details