moviepy.video.fx.all.mask_and¶
-
moviepy.video.fx.all.
mask_and
(clip, other_clip)[source]¶ Returns the logical ‘and’ (minimum pixel color values) between two masks.
The result has the duration of the clip to which has been applied, if it has any.
- Parameters:
- other_clip ImageClip or np.ndarray
Clip used to mask the original clip.
Examples
>>> clip = ColorClip(color=(255, 0, 0), size=(1, 1)) # red >>> mask = ColorClip(color=(0, 255, 0), size=(1, 1)) # green >>> masked_clip = clip.fx(mask_and, mask) # black >>> masked_clip.get_frame(0) [[[0 0 0]]]