Spaces:
Runtime error
Runtime error
Commit
·
f446994
1
Parent(s):
c0efcd5
thumbnail issue
Browse files- backend/app.py +4 -3
backend/app.py
CHANGED
|
@@ -75,9 +75,10 @@ async def return_thumbnails():
|
|
| 75 |
thumbnails = []
|
| 76 |
for item in data:
|
| 77 |
pil_image = convert_to_pil(item['image'])
|
| 78 |
-
#
|
| 79 |
-
pil_image.
|
| 80 |
-
|
|
|
|
| 81 |
return thumbnails
|
| 82 |
|
| 83 |
def rgb_to_hex(rgb):
|
|
|
|
| 75 |
thumbnails = []
|
| 76 |
for item in data:
|
| 77 |
pil_image = convert_to_pil(item['image'])
|
| 78 |
+
# make a copy
|
| 79 |
+
thumb_img = pil_image.copy()
|
| 80 |
+
thumb_img.thumbnail((256, 256))
|
| 81 |
+
thumbnails.append(thumb_img)
|
| 82 |
return thumbnails
|
| 83 |
|
| 84 |
def rgb_to_hex(rgb):
|