package mm
Install
Dune Dependency
Authors
Maintainers
Sources
md5=003b6e873fe6158dda4627bb674fb57b
sha512=c486e8eaa5dd25a2629c9486c4048ffa2cdeae9e56f73bc8d01a86413038dd3473ebd383abb06f08a2a24a78a335f22aede98ac92436e42a9c6eb1a856f92dab
doc/mm.image/Mm_image/Image/YUV420/index.html
Module Image.YUV420
Source
Operations on images stored in YUV420 format, ie one luma (Y) and two chrominance (U and V) channels.
An 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.
Scale one image in order to fill the other. By default, proportions are not preserved.
Whether the image is opaque (it has no transparent or semi-transparent pixel).
Optimize the α channel by removing it in the case the image is opaque.
Takes 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.
box_alpha img x y width height alpha
sets alpha value on a given image box.
Remove alpha channel and set it as Y channel. Useful to inspect the alpha channel.
Fill 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).