ethix commited on
Commit
00675f8
·
1 Parent(s): 2fbd94c
Files changed (1) hide show
  1. debug.py +2 -2
debug.py CHANGED
@@ -44,8 +44,8 @@ def save_image(image_id, image_path: Image.Image) -> None:
44
  try:
45
  # print("Image path: " + image_path)
46
  print("Type: " + str(type(image_path)))
47
- with Image.open(image_id) as img:
48
- img = Image.open(image_path)
49
  img = img.convert("P", palette=Image.ADAPTIVE, colors=256)
50
  img.save(save_image_path)
51
 
 
44
  try:
45
  # print("Image path: " + image_path)
46
  print("Type: " + str(type(image_path)))
47
+ with load_image(image_path) as img:
48
+ img = Image.Image.load(img)
49
  img = img.convert("P", palette=Image.ADAPTIVE, colors=256)
50
  img.save(save_image_path)
51