package mm

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Operations on images in generic formats (many formats are supported).

exception Not_implemented

Since the module is very generic, many of the functions are not implemented for particular formats. This exception is raised when it is the case.

module Pixel : sig ... end

Generic pixels.

Data contents of an image.

type t

An image.

val width : t -> int

Width of an image.

val height : t -> int

Height of an image.

val pixel_format : t -> Pixel.format

Pixel format of an image.

val make_rgb : Pixel.rgb_format -> ?stride:int -> int -> int -> data -> t

Create a new image of RGB format.

val rgb_data : t -> data * int

Data and stride of an RGB image.

val yuv_data : t -> (data * int) * (data * data * int)

Data of a YUV image.

val of_RGBA32 : RGBA32.t -> t

Create a generic image from an RGBA32 image.

val to_RGBA32 : t -> RGBA32.t
val of_YUV420 : YUV420.t -> t

Create a generic image from a YUV420 image.

val to_YUV420 : t -> YUV420.t
val blank : t -> unit
val convert : ?proportional:bool -> ?scale_kind:RGBA32.Scale.kind -> t -> t -> unit

Convert a generic image from a format to another.

OCaml

Innovation. Community. Security.