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

Function load_images_from_folder

app.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
44
45def save_frames_as_png(frames, output_path):

Callers 1

generateFunction · 0.70

Calls 1

splitMethod · 0.80

Tested by

no test coverage detected