Spaces:
Sleeping
Sleeping
rogerxavier
commited on
Commit
•
6007ea2
1
Parent(s):
cd84989
Update api.py
Browse files
api.py
CHANGED
@@ -34,7 +34,7 @@ async def getOriginalMangaList(images: List[UploadFile] = File(...)):
|
|
34 |
for image in images:
|
35 |
img = await image.read()
|
36 |
image = Image.open(io.BytesIO(img)).convert("L").convert("RGB")
|
37 |
-
path_to_image = f"/manga/{
|
38 |
image.save(path_to_image)
|
39 |
return "获取图片保存成功"
|
40 |
|
|
|
34 |
for image in images:
|
35 |
img = await image.read()
|
36 |
image = Image.open(io.BytesIO(img)).convert("L").convert("RGB")
|
37 |
+
path_to_image = f"/manga/{images.index(image)}.jpg"
|
38 |
image.save(path_to_image)
|
39 |
return "获取图片保存成功"
|
40 |
|