Image.YUV420Operations on images stored in YUV420 format, ie one luma (Y) and two chrominance (U and V) channels.
type t = Mm_image.ImageYUV420.tAn image in YUV420 format.
Create an image with given width, height, alpha channel, Y (with given stride) U and V (with given stride). The strides of U and V are the same, the stride of the alpha channel is the same as Y.
val create : ?blank:bool -> ?y_stride:int -> ?uv_stride:int -> int -> int -> tval ensure_alpha : t -> unitEnsure that the image has an alpha channel.
val remove_alpha : t -> unitval of_YUV420_string : 
  ?y_stride:int ->
  ?uv_stride:int ->
  string ->
  int ->
  int ->
  tval of_RGB24_string : string -> int -> tval of_bitmap : ?fg:Pixel.rgba -> ?bg:Pixel.rgba -> Bitmap.t -> tval to_BMP : t -> stringval of_PPM : string -> tval width : t -> intWidth of an image.
val height : t -> intHeight of an image.
val y_stride : t -> intval uv_stride : t -> intval dimensions : t -> int * intval size : t -> intSize in bytes.
val has_alpha : t -> boolWhether the image has an alpha channel.
Scale one image in order to fill the other. By default, proportions are not preserved.
val blank_all : t -> unitval blank : t -> unitval hmirror : t -> unitFlip image horizontally.
val is_opaque : t -> boolWhether the image is opaque (it has no transparent or semi-transparent pixel).
val optimize_alpha : t -> unitOptimize the α channel by removing it in the case the image is opaque.
val fill_alpha : t -> int -> unitval disk_alpha : t -> int -> int -> int -> unitTakes a reference image and an image, and make similar portions transparent on the second (the last parameter controls the tolerance). This is useful to make bluescreens withtout bluescreens.
alpha_of_diff prev curr level speed takes a previous image and a current image and make parts of the current image more transparent if they were the same. level is the distance at which we consider two colors to be the same and speed is the inverse of the convergence speed.
val box_alpha : t -> int -> int -> int -> int -> float -> unitbox_alpha img x y width height alpha sets alpha value on a given image box.
val alpha_to_y : t -> unitRemove alpha channel and set it as Y channel. Useful to inspect the alpha channel.
val randomize : t -> unitval gradient_uv : t -> (int * int) -> (int * int) -> (int * int) -> unitFill the image with a gradient. It takes as argument the (U,V) at pixel (0,0), at pixel (xmax,0) and at pixel (0,ymax).
val get_pixel_y : t -> int -> int -> intval get_pixel_u : t -> int -> int -> intval get_pixel_v : t -> int -> int -> intval get_pixel_a : t -> int -> int -> intval get_pixel_rgba : t -> int -> int -> Pixel.rgbaval set_pixel_rgba : t -> int -> int -> Pixel.rgba -> unitval to_int_image : t -> int array arrayConvert to format useable by Graphics.make_image.
module Effect : sig ... end