moviepy.video.VideoClip.ImageClip#
- class moviepy.video.VideoClip.ImageClip(img, is_mask=False, transparent=True, 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.
duration -- Duration of the clip in seconds. If not provided, the clip will have infinite duration (i.e. it will be displayed until the end of the composition in which it is included).
- 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'.