Multicolor Subtitles
This patch uses jit.lcd to draw white text on a black background, uses that monochrome image as the color and alpha channels, colorizes the text using jit.scalebias, and then does an alphablend of the text with a movie.
This patch uses jit.lcd to draw white text on a black background, uses that monochrome image as the color and alpha channels, colorizes the text using jit.scalebias, and then does an alphablend of the text with a movie.
This example shows how you can make changes to only one plane of a matrix. In order to achieve this, we need to rely on jit.unpack, which by itself separates the planes on a matrix (actually creating a copy), and then add the modified plane (with some process to be included inside the patcher oneplane object) to the original matrix.
This patch shows how to use a mask in the alpha channel to impose a non-rectangular image on top of another image. For this patch to work, you will need to download the mask file called "mask.png" (which was made using the patch in "Make an elliptical mask in Jitter").
If you have a 3 plane matrix and a 4 plane matrix, and would like to combine these to create a 7 plane matrix, you would first unpack a multiple matrix into multiple single matrices using the jit.unpack object, and then combine again with the jit.pack object.
One way to superimpose 2D graphics over a video is to draw into a jit.lcd object and then use alpha masking to overlay the jit.lcd contents on top of the video image.