package mm

  1. Overview
  2. Docs
The mm library contains high-level to create and manipulate multimedia streams (audio, video, MIDI)

Install

Dune Dependency

Authors

Maintainers

Sources

v0.7.0.tar.gz
md5=5338523070ce8aeae652b8680718c6d8
sha512=e12c2048c4438911578e2dbe109a1d1c98b1c05ef80b3a860a2e275eeb24d3831484d8e82ca34914da3b94850e96e3ef2c2e5c3801d031062780142b7fdca90c

doc/mm.image/Mm_image/Image/RGBA32/index.html

Module Image.RGBA32Source

Operations on images stored in RGBA32 format (ie RGB channels + an alpha channel, one byte for each).

Sourcemodule Color : sig ... end
Sourcetype t

An image.

Sourceval width : t -> int
Sourceval height : t -> int
Sourceval dimensions : t -> int * int
Sourceval data : t -> data
Sourceval size : t -> int
Sourceval stride : t -> int
Sourceval create : int -> int -> t
Sourceval make : ?stride:int -> int -> int -> data -> t
Sourceval get_pixel : t -> int -> int -> Color.t
Sourceval set_pixel : t -> int -> int -> Color.t -> unit
Sourceval get_pixel_rgba : t -> int -> int -> Pixel.rgba
Sourceval set_pixel_rgba : t -> int -> int -> Pixel.rgba -> unit
Sourceval copy : t -> t
Sourceval blit : ?blank:bool -> ?x:int -> ?y:int -> ?w:int -> ?h:int -> t -> t -> unit
Sourceval blit_all : t -> t -> unit

blit_all src dst copies all the contents of src into dst.

Conversions from/to other formats

Sourceval of_RGB24_string : string -> int -> t
Sourceval to_RGB24_string : t -> string
Sourceval of_BGRA : BGRA.t -> t
Sourceval to_BGRA : t -> BGRA.t
Sourceval to_int_image : t -> int array array
Sourceval to_BMP : t -> string
Sourceval of_PPM : ?alpha:RGB8.Color.t -> string -> t
Sourceval swap_rb : t -> unit

Swap red and blue channels. Useful for quickly handling BGRA formats.

Manipulation of images

Sourceval add : ?x:int -> ?y:int -> ?w:int -> ?h:int -> t -> t -> unit
Sourceval fill_all : t -> Color.t -> unit
Sourceval blank_all : t -> unit
Sourceval fill_alpha : t -> int -> unit
Sourceval blank : t -> unit
Sourceval randomize_all : t -> unit
Sourceval randomize : t -> unit
Sourceval scale : ?proportional:bool -> t -> t -> unit

scale src dst scales the image src to dst.

Sourcemodule Scale : sig ... end
Sourcemodule Effect : sig ... end
Sourcemodule Draw : sig ... end
Sourcemodule Motion : sig ... end
OCaml

Innovation. Community. Security.