MCPcopy Create free account
hub / github.com/Francis-Rings/StableAnimator / load_images_from_folder

Function load_images_from_folder

inference_op.py:32–42  ·  view source on GitHub ↗
(folder, width, height)

Source from the content-addressed store, hash-verified

30
31
32def load_images_from_folder(folder, width, height):
33 images = []
34 files = os.listdir(folder)
35 png_files = [f for f in files if f.endswith('.png')]
36 png_files.sort(key=lambda x: int(x.split('_')[1].split('.')[0]))
37 for filename in png_files:
38 img = Image.open(os.path.join(folder, filename)).convert('RGB')
39 img = img.resize((width, height))
40 images.append(img)
41
42 return images
43
44def export_to_gif(frames, output_gif_path, fps):
45 """

Callers 1

inference_op.pyFile · 0.70

Calls 1

splitMethod · 0.80

Tested by

no test coverage detected