moviepy.video.io.ffmpeg_reader.ffmpeg_read_image#
- moviepy.video.io.ffmpeg_reader.ffmpeg_read_image(filename, with_mask=True, pixel_format=None)[source]#
Read an image file (PNG, BMP, JPEG…).
Wraps FFMPEG_Videoreader to read just one image. Returns an ImageClip.
This function is not meant to be used directly in MoviePy. Use ImageClip instead to make clips out of image files.
- Parameters:
filename – Name of the image file. Can be of any format supported by ffmpeg.
with_mask – If the image has a transparency layer,
with_mask=true
will save this layer as the mask of the returned ImageClippixel_format – Optional: Pixel format for the image to read. If is not specified ‘rgb24’ will be used as the default format unless
with_mask
is set asTrue
, then ‘rgba’ will be used.