Module Image.RGBA32

module RGBA32: sig .. end

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


module Color: sig .. end
type data = (int, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t 
type t 

An image.

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

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

Conversions from/to other formats

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

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

Manipulation of images

val add : ?x:int ->
?y:int -> ?w:int -> ?h:int -> t -> t -> unit
val fill_all : t -> Color.t -> unit
val blank_all : t -> unit
val randomize_all : t -> unit
module Scale: sig .. end
module Effect: sig .. end
module Draw: sig .. end
module Motion: sig .. end