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/mosaique/Mosaique/index.html

Module MosaiqueSource

OCaml bindings for libvips image processing library

Types

Sourcetype t

Opaque type representing a vips image

Sourcetype format =
  1. | JPEG of int
    (*

    JPEG with quality 1-100

    *)
  2. | PNG
    (*

    PNG format

    *)
  3. | WEBP of int
    (*

    WebP with quality 1-100

    *)

Image format for saving

Core Functions

Sourceval shutdown : unit -> unit

Shutdown the vips library. Should be called at program exit.

Image Loading and Saving

Sourceval load : string -> t

Load an image from file

Sourceval save : t -> format -> string -> unit

Save an image to file with specified format

Image Information

Sourceval width : t -> int

Get image width in pixels

Sourceval height : t -> int

Get image height in pixels

Sourceval bands : t -> int

Get number of bands (channels) in the image

Image Operations

Sourceval resize : t -> width:int -> height:int -> t

Resize image to specified width and height

Sourceval rotate : t -> float -> t

Rotate image by specified angle in degrees

Sourceval grayscale : t -> t

Convert image to grayscale

Sourceval flip_horizontal : t -> t

Flip image horizontally

Sourceval flip_vertical : t -> t

Flip image vertically

Error Handling

Sourceexception Vips_error of string

Exception raised by vips operations