package imagelib

  1. Overview
  2. Docs

Note: This module is an interface to the pure OCaml implementations of various image formats.

For an easy to use file-based interface, see the imagelib.unix findlib package distributed with imagelib. You find said interface in src/imageLib_unix.mli or in the documentation for the module ImageLib_unix.

ImageLib_unix will fall back to using imagemagick's convert utility to accomodate the manipulation of file formats that are not well supported by this library.

The GIF implementation is still experimental; the ImageLib_unix module reverts to imagemagick to avoid causing problems stemming from the premature state of the GIF stack.

val size : extension:string -> ImageUtil.chunk_reader -> int * int
val openfile : extension:string -> ImageUtil.chunk_reader -> Image.image
val openfile_streaming : extension:string -> ImageUtil.chunk_reader -> [ `GIF of ImageGIF.read_state ] option -> Image.image option * int * [ `GIF of ImageGIF.read_state ] option

see ReadImageStreaming.read_streaming

val writefile : extension:string -> ImageUtil.chunk_writer -> Image.image -> unit
module PPM : sig ... end
module PNG : sig ... end
module JPG : sig ... end
module GIF : sig ... end
module XCF : sig ... end
module BMP : sig ... end
OCaml

Innovation. Community. Security.