package mm

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

Operations on images stored in YUV420 format, ie one luma (Y) and two chrominance (U and V) channels.

type t

An image in YUV420 format.

val make : int -> int -> Data.t -> int -> Data.t -> Data.t -> int -> t
val make_data : int -> int -> Data.t -> int -> int -> t
val create : ?y_stride:int -> ?uv_stride:int -> int -> int -> t
val ensure_alpha : t -> unit

Ensure that the image has an alpha channel.

val remove_alpha : t -> unit
val of_YUV420_string : ?y_stride:int -> ?uv_stride:int -> string -> int -> int -> t
val of_RGB24_string : string -> int -> t
val of_RGBA32 : RGBA32.t -> t
val to_RGBA32 : t -> RGBA32.t
val of_PPM : string -> t
val width : t -> int

Width of an image.

val height : t -> int

Height of an image.

val y : t -> Data.t
val y_stride : t -> int
val u : t -> Data.t
val v : t -> Data.t
val uv_stride : t -> int
val data : t -> Data.t * Data.t * Data.t
val alpha : t -> Data.t option
val set_alpha : t -> Data.t option -> unit
val dimensions : t -> int * int
val size : t -> int

Size in bytes.

val has_alpha : t -> bool

Whether the image has an alpha channel.

val copy : t -> t
val blit_all : t -> t -> unit
val blit : t -> t -> unit
val scale : ?proportional:bool -> t -> t -> unit
val blank_all : t -> unit
val add : t -> ?x:int -> ?y:int -> t -> unit

Add the fist image to the second.

val blank : t -> unit
val fill : t -> Pixel.yuv -> unit
val fill_alpha : t -> int -> unit
val disk_alpha : t -> int -> int -> int -> unit
val box_alpha : t -> int -> int -> int -> int -> float -> unit
val randomize : t -> unit
val get_pixel_y : t -> int -> int -> int
val get_pixel_u : t -> int -> int -> int
val get_pixel_v : t -> int -> int -> int
val get_pixel_rgba : t -> int -> int -> Pixel.rgba
val set_pixel_rgba : t -> int -> int -> Pixel.rgba -> unit
val to_int_image : t -> int array array

Convert to format useable by Graphics.make_image.

module Effect : sig ... end
OCaml

Innovation. Community. Security.