Module Image.Generic

module Generic: sig .. end

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.

type data = (int, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t 

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 : Image.RGBA32.t -> t

Create a generic image from an RGBA32 image.

val of_YUV420 : Image.YUV420.t -> t

Create a generic image from a YUV420 image.

val convert : ?copy:bool ->
?proportional:bool ->
?scale_kind:Image.RGBA32.Scale.kind ->
t -> t -> unit

Convert a generic image from a format to another.