How did the images get into the SQLite3 database?
what does the .schema look like?
What does the GUI look like?
Please explain all in a way the can clearly be understood.
import only loads a library into python, it's not used to load images.
you can however load an entire directory of images into an intermediate list thusly:
This code is untested, but should work. You can change the suffix clause or eliminate it entirely if you have mixed image types
Please note that this could get very memory intensive, depending on size of images, so should only be done this way if you have enough memory to hold all images.
Also note that pathlib requires python 3.6 or newer
what does the .schema look like?
What does the GUI look like?
Please explain all in a way the can clearly be understood.
import only loads a library into python, it's not used to load images.
you can however load an entire directory of images into an intermediate list thusly:
This code is untested, but should work. You can change the suffix clause or eliminate it entirely if you have mixed image types
import pathlib import os #Anchor CWD to script directory os.chdir(os.path.abspath(os.path.dirname(__file__))) # You can change path below, relative paths (from script directory) are OK. path_to_images = Path('./images') image_list = [] images = [imagex for imagex in path_to_images.iterdir() if imagex.is_file() and imagex.suffix== '.png'] for image in images: with image.open() as fp: image_list.append(fp.read)This creates a list of images. You can modify code to directly load then into tkinter.
Please note that this could get very memory intensive, depending on size of images, so should only be done this way if you have enough memory to hold all images.
Also note that pathlib requires python 3.6 or newer