package imagelib

  1. Overview
  2. Docs
module Pixmap : sig ... end
type pixmap =
  1. | Grey of Pixmap.t
  2. | GreyA of Pixmap.t * Pixmap.t
  3. | RGB of Pixmap.t * Pixmap.t * Pixmap.t
  4. | RGBA of Pixmap.t * Pixmap.t * Pixmap.t * Pixmap.t
type image = {
  1. width : int;
  2. height : int;
  3. max_val : int;
  4. pixels : pixmap;
}
val create_rgb : ?alpha:bool -> ?max_val:int -> int -> int -> image
val create_grey : ?alpha:bool -> ?max_val:int -> int -> int -> image
val read_rgba : image -> int -> int -> (int -> int -> int -> int -> 'a) -> 'a
val read_rgb : image -> int -> int -> (int -> int -> int -> 'a) -> 'a
val read_greya : image -> int -> int -> (int -> int -> 'a) -> 'a
val read_grey : image -> int -> int -> (int -> 'a) -> 'a
val write_rgba : image -> int -> int -> int -> int -> int -> int -> unit
val write_rgb : image -> int -> int -> int -> int -> int -> unit
val write_greya : image -> int -> int -> int -> int -> unit
val write_grey : image -> int -> int -> int -> unit
exception Corrupted_image of string
module type ReadImage = sig ... end
exception Not_yet_implemented of string
OCaml

Innovation. Community. Security.