Spaces:
Sleeping
Sleeping
Nunzio commited on
Commit ·
f3229fd
1
Parent(s): 02964c6
addedo images
Browse files- utils/imageHandling.py +1 -1
utils/imageHandling.py
CHANGED
|
@@ -95,5 +95,5 @@ def loadPreloadedImages(*args:str) -> list[tuple[Image.Image, str]]:
|
|
| 95 |
Returns:
|
| 96 |
images (list[tuple[Image.Image, str]]): List of loaded images with their original paths.
|
| 97 |
"""
|
| 98 |
-
return sorted([
|
| 99 |
for imageDir in args for image in os.listdir(imageDir) if image.endswith((".png", ".jpg", "jpeg"))], key=lambda x: x[1])
|
|
|
|
| 95 |
Returns:
|
| 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])
|