moviepy.video.VideoClip.ImageClip#
- class moviepy.video.VideoClip.ImageClip(img, is_mask=False, transparent=True, fromalpha=False, duration=None)[source]#
Class for non-moving VideoClips.
A video clip originating from a picture. This clip will simply display the given picture at all times.
Examples
>>> clip = ImageClip("myHouse.jpeg") >>> clip = ImageClip( someArray ) # a Numpy array represent
- Parameters:
img – Any picture file (png, tiff, jpeg, etc.) as a string or a path-like object, or any array representing an RGB image (for instance a frame from a VideoClip).
is_mask – Set this parameter to True if the clip is a mask.
transparent – Set this parameter to True (default) if you want the alpha layer of the picture (if it exists) to be used as a mask.
- img#
Array representing the image of the clip.
- image_transform(image_func, apply_to=None)[source]#
Image-transformation filter.
Does the same as VideoClip.image_transform, but for ImageClip the transformed clip is computed once and for all at the beginning, and not for each ‘frame’.