Skip to content
ArefShojaeiPublic

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Imago

Image inspection and processing toolkit with HTTP API and CLI support.

Built with Dart and River.


Features

  • HTTP API Server – RESTful endpoints for EXIF reading, cleaning, securing and stripping metadata
  • Full CLI – Commands for serve, exif, secure, clean, strip, and resize
  • EXIF data extraction and summary
  • Remove sensitive metadata (secure)
  • Completely strip all EXIF data (strip)
  • Normalize / re-encode images (clean)
  • Resize with aspect-ratio preservation
  • Automatic output under assets/images/output/
  • Supported formats: JPEG, PNG, WebP

Installation

git clone https://github.com/ArefShojaei/Imago.git
cd Imago
dart pub get

CLI Usage

# Show help
dart run bin/imago.dart

# Start the HTTP server
dart run bin/imago.dart serve --port 8080
# or short alias
dart run bin/imago.dart s --host 0.0.0.0 --port 3000

# Extract EXIF metadata
dart run bin/imago.dart exif photo.jpg
dart run bin/imago.dart exif photo.jpg --full

# Secure (remove sensitive metadata)
dart run bin/imago.dart secure photo.jpg
dart run bin/imago.dart secure photo.jpg --out safe.jpg

# Clean / normalize image
dart run bin/imago.dart clean photo.jpg

# Completely strip EXIF
dart run bin/imago.dart strip photo.jpg

# Resize
dart run bin/imago.dart resize photo.jpg --width 800
dart run bin/imago.dart resize photo.jpg --width 1200 --height 800 --out resized.jpg

You can also run the pure server entry point:

dart run bin/server.dart --port 8080

HTTP API

After starting the server (imago serve):

Method Path Description Body example
GET / API info –
GET /health Health check –
POST /exif Extract EXIF data {"image": "path/to.jpg"}
POST /clean Normalize image and save {"image": "path/to.jpg"}
POST /secure Remove sensitive metadata and save {"image": "path/to.jpg"}
POST /strip Completely strip EXIF and save {"image": "path/to.jpg"}

Example requests

# Health check
curl http://localhost:8080/health

# Extract EXIF
curl -X POST http://localhost:8080/exif \
  -H "Content-Type: application/json" \
  -d '{"image": "assets/images/input/photo.jpg"}'

# Secure image
curl -X POST http://localhost:8080/secure \
  -H "Content-Type: application/json" \
  -d '{"image": "assets/images/input/photo.jpg"}'

All processing endpoints return the path of the generated file under assets/images/output/.


Project Structure

imago/
├── bin/
│   └── imago.dart          # Full CLI + server
├── lib/
│   ├── app.dart
│   ├── http/
│   │   ├── controllers/
│   │   │   └── image_controller.dart
│   │   └── middlewares/
│   │       └── logger.dart
│   └── services/
│       ├── image_service.dart
│       └── exif_service.dart
├── assets/images/
│   ├── input/              # Place your test images here
│   └── output/             # Processed images appear here
├── pubspec.yaml
└── README.md

Development

dart pub get
dart analyze
dart run bin/imago.dart --help

License

MIT © Aref Shojaei

Releases

Packages

Contributors

Languages