'Writes the videoclip to a sequence of image files.
Parameters
nameformat
A filename specifying the numerotation format and extension
of the pictures. For instance "frame%03d.png" for filenames
indexed with 3 digits and PNG format. Also possible:
"some_folder/frame%04d.jpeg", etc.
fps
Number of frames per second to consider when writing the
clip. If not specified, the clip\'s ``fps`` attribute will
be used if it has one.
withmask
will save the clip\'s mask (if any) as an alpha canal (PNGs only).
verbose
Boolean indicating whether to print infomation.
progress_bar
Boolean indicating whether to show the progress bar.
Returns
names_list
A list of all the files generated.
Notes
The resulting image sequence can be read using e.g. the class
``ImageSequenceClip``.'

@requires_duration
@use_clip_fps_by_default
@convert_masks_to_RGB
def write_images_sequence(self, nameformat, fps=None, verbose=True, withmask=True, progress_bar=True):

    verbose_print(verbose, ('[MoviePy]    Writing    frames    %s.' % nameformat))
    tt = np.arange(0, self.duration, (1.0 / fps))
    filenames = []
    total = (int((self.duration / fps)) + 1)
    for (i, t) in tqdm(enumerate(tt), total=total, disable=(not progress_bar)):
        name = (nameformat % i)
        filenames.append(name)
        self.save_frame(name, t, withmask=withmask)
    verbose_print(verbose, ('[MoviePy]:    Done    writing    frames    %s.\n\n' % nameformat))
    return filenames
