Tkinter load images faster?

634 Views Asked by At

Currently I'm using

def load(load_list, path_to_animation_folder):
        for frame in os.listdir(path_to_animation_folder):
            full_path = os.path.join(path_to_animation_folder, frame)
            loaded_image = ImageTk.PhotoImage(Image.open(full_path))
            load_list.append(loaded_image)

It's a rather slow approach. I have a lot of sh*t to load. And it takes 2 minutes to launch the program currently, which is unacceptable, I'll need to definitely find another way.

So guys, help me out here.

0

There are 0 best solutions below