GraMaMa (Gradient Mask Maker)

Abstract

author: Wilbert Dijkhof (original version by E-male)
version: 0.2
download: xxx
category: Misc Plugins
requirements:

license: public domain


Usage

GraMaMa (clip, int mode = 1, int a = clip.width/2, int b = clip.height/2, int rad = clip.width/4, int rad2, bool binarize = false)

Description of the filter

GraMaMa creates a mask (either greyscale or black/white) given a prescribed shape (such as circle, ellipse, line, square and rectangle). It replaces the input clip by a mask with the same dimensions and color format.

mode: 1 (circle), 2 (square), 3 (diamond), 4 (line), 5 (ellipse) or 6 (rectangle).

(a,b) is the center of the mask. It can be located outside the clip.

rad is the horizontal radius of the mask.

rad2 is the vertical radius of the mask (for mode=1,3,4 it is equal to rad; for mode=5,6 (default rad/2) it can be set separately; for mode=2 is results in a vertical gradient mask (when rad2>0).

binarize = false (gradient mask), binarize = true (black and white mask).

Examples

ellipse gradient mask square gradient mask
GraMaMa(5, 320, 240, 120, 60) GraMaMa(3, 320, 240, 120)

If you don't have an input clip, you can use BlackClip(width=..., height=..., fps=...). For example:

horizontal line gradient mask

LoadPlugin("F:\CompilingPlugins\GraMaMa\Release\GraMaMa.dll")
BlankClip(width=640, height=480, fps=25)
ConvertToYV12()
GraMaMa(4, 320, 240, 120)

Version

v0.2, 14th February 2008

v0.1, 21st January 2005