Image.YUV420SourceOperations 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).