Mm.ImageYUV420
module Bitmap = Mm_image.ImageBitmap
module RGBA32 = Mm_image.ImageRGBA32
type t = {
mutable y : Mm_image.ImageBase.Data.t;
mutable y_stride : int;
mutable u : Mm_image.ImageBase.Data.t;
mutable v : Mm_image.ImageBase.Data.t;
mutable uv_stride : int;
width : int;
height : int;
mutable alpha : Mm_image.ImageBase.Data.t option;
}
val width : t -> int
val height : t -> int
val dimensions : t -> int * int
val y : t -> Mm_image.ImageBase.Data.t
val y_stride : t -> int
val u : t -> Mm_image.ImageBase.Data.t
val v : t -> Mm_image.ImageBase.Data.t
val uv_stride : t -> int
val data :
t ->
Mm_image.ImageBase.Data.t
* Mm_image.ImageBase.Data.t
* Mm_image.ImageBase.Data.t
val alpha : t -> Mm_image.ImageBase.Data.t option
val set_alpha : t -> Mm_image.ImageBase.Data.t option -> unit
val size : t -> int
val ensure_alpha : t -> unit
val fill : t -> Mm_image.ImageBase.Pixel.yuv -> unit
val fill_alpha : t -> int -> unit
val blank : t -> unit
val blank_all : t -> unit
val make :
int ->
int ->
?alpha:Mm_image.ImageBase.Data.t ->
Mm_image.ImageBase.Data.t ->
int ->
Mm_image.ImageBase.Data.t ->
Mm_image.ImageBase.Data.t ->
int ->
t
val make_data :
int ->
int ->
(int, Stdlib.Bigarray.int8_unsigned_elt, Stdlib.Bigarray.c_layout)
Stdlib.Bigarray.Array1.t ->
int ->
int ->
t
val create : ?blank:bool -> ?y_stride:int -> ?uv_stride:int -> int -> int -> t
val packed_data :
t ->
(int, Stdlib.Bigarray.int8_unsigned_elt, Stdlib.Bigarray.c_layout)
Stdlib.Bigarray.Array1.t
val has_alpha : t -> bool
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_PPM : string -> t
val to_BMP : t -> string
val randomize : t -> unit
val set_pixel_rgba : t -> int -> int -> (int * int * int * int) -> 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_a : t -> int -> int -> int
val get_pixel_rgba : t -> int -> int -> Mm_image.ImageBase.Pixel.rgba
val to_int_image : t -> int array array
scale_coef src dst (xn,xd) (yn,yd)
scales src
into dst
multiplying x dimension by xn/xd and y dimension by yn/yd.
val is_opaque : t -> bool
val optimize_alpha : t -> unit
val alpha_to_y : t -> unit
val scale_alpha : t -> float -> unit
val disk_alpha : t -> int -> int -> int -> unit
val box_alpha : t -> int -> int -> int -> int -> float -> unit
val alpha_of_color : t -> (int * int * int) -> int -> unit
val gradient_uv : t -> (int * int) -> (int * int) -> (int * int) -> unit
val hmirror : t -> unit
module Effect : sig ... end