package mosaique

  1. Overview
  2. Docs
OCaml bindings for libvips image processing library

Install

dune-project
 Dependency

Authors

Maintainers

Sources

0.0.1.tar.gz
md5=f3869c851b9cd69a7394e9015d109fcd
sha512=c2cd78a70b797f14973db12caa51222ed0f065249bb977ea2a3bd9b12fee8d6341cce85aed02bd16bd774e20ec925fdf2d2a7340497ba2f61349b6a78947759b

doc/README.html

Mosaique - OCaml bindings for libvips

Mosaique provides OCaml bindings for libvips, a fast image processing library. It allows you to load, manipulate, and save images using OCaml.

Features

  • Load and save images in various formats (PNG, JPEG, WebP, etc.)
  • Basic image operations: resize, rotate, flip, grayscale conversion

Usage

(* Load an image *)
let img = Mosaique.load "input.jpg" in
(* Get image information *)
Printf.printf "Image: %dx%d pixels, %d bands\n" 
  (Mosaique.width img) (Mosaique.height img) (Mosaique.bands img);

(* Resize the image *)
let resized = Mosaique.resize img ~width:800 ~height:600 in

(* Convert to grayscale *)
let gray = Mosaique.grayscale resized in

(* Save the result *)
Mosaique.save gray Mosaique.PNG "output.png";

(* Clean shutdown *)
Mosaique.shutdown ()

Contributing

This is a minimal implementation focused on core image processing operations. Contributions are welcome to expand the API coverage.