mhamzaerol commited on
Commit
f446994
·
1 Parent(s): c0efcd5

thumbnail issue

Browse files
Files changed (1) hide show
  1. 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
- # resize into 200x200 thumbnails
79
- pil_image.thumbnail((256, 256))
80
- thumbnails.append(pil_image)
 
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):