smarts.env.wrappers.gif_recorder module

class smarts.env.wrappers.gif_recorder.GifRecorder(video_name_folder: str, env: gymnasium.Env)[source]

Uses images (such as from gym’s "rgb_array") to create a gif file.

capture_frame(step_num: int, image: ndarray)[source]

Create image according to the "rgb_array" and store it with step number in the destination folder

close_recorder()[source]

close the recorder by deleting the image folder.

generate_gif()[source]

Use the images in the same folder to create a gif file.