sig
module Data :
sig
type t =
(int, Stdlib.Bigarray.int8_unsigned_elt, Stdlib.Bigarray.c_layout)
Stdlib.Bigarray.Array1.t
val alloc : int -> Image.Data.t
val of_string : string -> Image.Data.t
val to_string : Image.Data.t -> string
val length : Image.Data.t -> int
val blit : Image.Data.t -> int -> Image.Data.t -> int -> int -> unit
val blit_all : Image.Data.t -> Image.Data.t -> unit
val copy : Image.Data.t -> Image.Data.t
val round : int -> int -> int
end
module Pixel :
sig
type rgba = int * int * int * int
type rgb = int * int * int
type yuv = int * int * int
type yuva = Image.Pixel.yuv * int
val yuv_of_rgb : Image.Pixel.rgb -> Image.Pixel.yuv
val rgb_of_yuv : Image.Pixel.yuv -> Image.Pixel.rgb
end
module Draw :
sig val line : (int -> int -> unit) -> int * int -> int * int -> unit end
module RGB8 :
sig
module Color :
sig
type t = int * int * int
val of_int : int -> Image.RGB8.Color.t
end
end
module BGRA : sig type t val data : Image.BGRA.t -> Image.Data.t end
module RGBA32 :
sig
module Color : sig type t = int * int * int * int end
type data =
(int, Stdlib.Bigarray.int8_unsigned_elt, Stdlib.Bigarray.c_layout)
Stdlib.Bigarray.Array1.t
type t
val width : Image.RGBA32.t -> int
val height : Image.RGBA32.t -> int
val dimensions : Image.RGBA32.t -> int * int
val data : Image.RGBA32.t -> Image.RGBA32.data
val size : Image.RGBA32.t -> int
val stride : Image.RGBA32.t -> int
val create : int -> int -> Image.RGBA32.t
val make :
?stride:int -> int -> int -> Image.RGBA32.data -> Image.RGBA32.t
val get_pixel : Image.RGBA32.t -> int -> int -> Image.RGBA32.Color.t
val set_pixel :
Image.RGBA32.t -> int -> int -> Image.RGBA32.Color.t -> unit
val get_pixel_rgba : Image.RGBA32.t -> int -> int -> Image.Pixel.rgba
val set_pixel_rgba :
Image.RGBA32.t -> int -> int -> Image.Pixel.rgba -> unit
val copy : Image.RGBA32.t -> Image.RGBA32.t
val blit :
?blank:bool ->
?x:int ->
?y:int ->
?w:int -> ?h:int -> Image.RGBA32.t -> Image.RGBA32.t -> unit
val blit_all : Image.RGBA32.t -> Image.RGBA32.t -> unit
val of_RGB24_string : string -> int -> Image.RGBA32.t
val to_RGB24_string : Image.RGBA32.t -> string
val of_BGRA : Image.BGRA.t -> Image.RGBA32.t
val to_BGRA : Image.RGBA32.t -> Image.BGRA.t
val to_int_image : Image.RGBA32.t -> int array array
val to_BMP : Image.RGBA32.t -> string
val of_PPM : ?alpha:Image.RGB8.Color.t -> string -> Image.RGBA32.t
val swap_rb : Image.RGBA32.t -> unit
val add :
?x:int ->
?y:int ->
?w:int -> ?h:int -> Image.RGBA32.t -> Image.RGBA32.t -> unit
val fill_all : Image.RGBA32.t -> Image.RGBA32.Color.t -> unit
val blank_all : Image.RGBA32.t -> unit
val fill_alpha : Image.RGBA32.t -> int -> unit
val blank : Image.RGBA32.t -> unit
val randomize_all : Image.RGBA32.t -> unit
val randomize : Image.RGBA32.t -> unit
val scale :
?proportional:bool -> Image.RGBA32.t -> Image.RGBA32.t -> unit
module Scale :
sig
type kind = Linear | Bilinear
val onto :
?kind:Image.RGBA32.Scale.kind ->
?proportional:bool -> Image.RGBA32.t -> Image.RGBA32.t -> unit
val create :
?kind:Image.RGBA32.Scale.kind ->
?copy:bool ->
?proportional:bool ->
Image.RGBA32.t -> int -> int -> Image.RGBA32.t
end
module Effect :
sig
val translate : Image.RGBA32.t -> int -> int -> unit
val affine : Image.RGBA32.t -> float -> float -> int -> int -> unit
val flip : Image.RGBA32.t -> unit
val greyscale : Image.RGBA32.t -> unit
val sepia : Image.RGBA32.t -> unit
val lomo : Image.RGBA32.t -> unit
val invert : Image.RGBA32.t -> unit
val rotate : Image.RGBA32.t -> float -> unit
val mask : Image.RGBA32.t -> Image.RGBA32.t -> unit
val box_blur : Image.RGBA32.t -> unit
module Alpha :
sig
val blur : Image.RGBA32.t -> unit
val scale : Image.RGBA32.t -> float -> unit
val disk : Image.RGBA32.t -> int -> int -> int -> unit
val of_color :
Image.RGBA32.t -> Image.RGB8.Color.t -> int -> unit
end
end
module Draw :
sig
val line :
Image.RGBA32.t ->
Image.RGBA32.Color.t -> int * int -> int * int -> unit
end
module Motion :
sig
val compute : int -> Image.RGBA32.t -> Image.RGBA32.t -> int * int
module Multi :
sig
type vectors
val compute :
int ->
Image.RGBA32.t ->
Image.RGBA32.t -> Image.RGBA32.Motion.Multi.vectors
val median_denoise : Image.RGBA32.Motion.Multi.vectors -> unit
val mean : Image.RGBA32.Motion.Multi.vectors -> int * int
val arrows :
Image.RGBA32.Motion.Multi.vectors -> Image.RGBA32.t -> unit
end
end
end
module YUV420 :
sig
type t
val make :
int ->
int ->
Image.Data.t ->
int -> Image.Data.t -> Image.Data.t -> int -> Image.YUV420.t
val make_data :
int -> int -> Image.Data.t -> int -> int -> Image.YUV420.t
val create :
?y_stride:int -> ?uv_stride:int -> int -> int -> Image.YUV420.t
val ensure_alpha : Image.YUV420.t -> unit
val remove_alpha : Image.YUV420.t -> unit
val of_YUV420_string :
?y_stride:int ->
?uv_stride:int -> string -> int -> int -> Image.YUV420.t
val of_RGB24_string : string -> int -> Image.YUV420.t
val of_RGBA32 : Image.RGBA32.t -> Image.YUV420.t
val to_RGBA32 : Image.YUV420.t -> Image.RGBA32.t
val of_PPM : string -> Image.YUV420.t
val width : Image.YUV420.t -> int
val height : Image.YUV420.t -> int
val y : Image.YUV420.t -> Image.Data.t
val y_stride : Image.YUV420.t -> int
val u : Image.YUV420.t -> Image.Data.t
val v : Image.YUV420.t -> Image.Data.t
val uv_stride : Image.YUV420.t -> int
val data : Image.YUV420.t -> Image.Data.t * Image.Data.t * Image.Data.t
val alpha : Image.YUV420.t -> Image.Data.t option
val dimensions : Image.YUV420.t -> int * int
val size : Image.YUV420.t -> int
val has_alpha : Image.YUV420.t -> bool
val copy : Image.YUV420.t -> Image.YUV420.t
val blit_all : Image.YUV420.t -> Image.YUV420.t -> unit
val blit : Image.YUV420.t -> Image.YUV420.t -> unit
val scale :
?proportional:bool -> Image.YUV420.t -> Image.YUV420.t -> unit
val blank_all : Image.YUV420.t -> unit
val add : Image.YUV420.t -> ?x:int -> ?y:int -> Image.YUV420.t -> unit
val blank : Image.YUV420.t -> unit
val fill : Image.YUV420.t -> Image.Pixel.yuv -> unit
val fill_alpha : Image.YUV420.t -> int -> unit
val disk_alpha : Image.YUV420.t -> int -> int -> int -> unit
val randomize : Image.YUV420.t -> unit
val get_pixel_y : Image.YUV420.t -> int -> int -> int
val get_pixel_u : Image.YUV420.t -> int -> int -> int
val get_pixel_v : Image.YUV420.t -> int -> int -> int
val get_pixel_rgba : Image.YUV420.t -> int -> int -> Image.Pixel.rgba
val set_pixel_rgba :
Image.YUV420.t -> int -> int -> Image.Pixel.rgba -> unit
val to_int_image : Image.YUV420.t -> int array array
module Effect :
sig
val greyscale : Image.YUV420.t -> unit
val sepia : Image.YUV420.t -> unit
val invert : Image.YUV420.t -> unit
val lomo : Image.YUV420.t -> unit
end
end
module Generic :
sig
exception Not_implemented
module Pixel :
sig
type rgb_format = RGB24 | BGR24 | RGB32 | BGR32 | RGBA32
type yuv_format =
YUV422
| YUV444
| YUV411
| YUV410
| YUVJ420
| YUVJ422
| YUVJ444
type format =
RGB of Image.Generic.Pixel.rgb_format
| YUV of Image.Generic.Pixel.yuv_format
val string_of_format : Image.Generic.Pixel.format -> string
end
type data =
(int, Stdlib.Bigarray.int8_unsigned_elt, Stdlib.Bigarray.c_layout)
Stdlib.Bigarray.Array1.t
type t
val width : Image.Generic.t -> int
val height : Image.Generic.t -> int
val pixel_format : Image.Generic.t -> Image.Generic.Pixel.format
val make_rgb :
Image.Generic.Pixel.rgb_format ->
?stride:int -> int -> int -> Image.Generic.data -> Image.Generic.t
val rgb_data : Image.Generic.t -> Image.Generic.data * int
val yuv_data :
Image.Generic.t ->
(Image.Generic.data * int) *
(Image.Generic.data * Image.Generic.data * int)
val of_RGBA32 : Image.RGBA32.t -> Image.Generic.t
val to_RGBA32 : Image.Generic.t -> Image.RGBA32.t
val of_YUV420 : Image.YUV420.t -> Image.Generic.t
val to_YUV420 : Image.Generic.t -> Image.YUV420.t
val convert :
?copy:bool ->
?proportional:bool ->
?scale_kind:Image.RGBA32.Scale.kind ->
Image.Generic.t -> Image.Generic.t -> unit
end
end