Nunzio commited on
Commit
02964c6
·
1 Parent(s): fea39ff
Files changed (1) hide show
  1. utils/imageHandling.py +1 -1
utils/imageHandling.py CHANGED
@@ -96,4 +96,4 @@ def loadPreloadedImages(*args:str) -> list[tuple[Image.Image, str]]:
96
  images (list[tuple[Image.Image, str]]): List of loaded images with their original paths.
97
  """
98
  return sorted([(Image.open(os.path.join(imageDir, image)).convert("RGB"), os.path.join(imageDir, image))
99
- for imageDir in args for image in os.listdir(imageDir) if image.endswith((".png", ".jpg", "jpeg"))])
 
96
  images (list[tuple[Image.Image, str]]): List of loaded images with their original paths.
97
  """
98
  return sorted([(Image.open(os.path.join(imageDir, image)).convert("RGB"), os.path.join(imageDir, image))
99
+ for imageDir in args for image in os.listdir(imageDir) if image.endswith((".png", ".jpg", "jpeg"))], key=lambda x: x[1])