Remove webp conversion, PIL doesn't need it!!!
This commit is contained in:
parent
5c5d1c7b36
commit
a29b85059d
2 changed files with 1 additions and 4 deletions
|
|
@ -25,5 +25,4 @@ trio==0.22.0
|
||||||
trio-websocket==0.9.2
|
trio-websocket==0.9.2
|
||||||
urllib3==1.26.12
|
urllib3==1.26.12
|
||||||
uuid==1.30
|
uuid==1.30
|
||||||
webptools==0.0.9
|
|
||||||
wsproto==1.2.0
|
wsproto==1.2.0
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,7 @@ def loadout_to_b64(loadout: List[str]) -> str:
|
||||||
frames: List[Image.Image] = []
|
frames: List[Image.Image] = []
|
||||||
for img_url in loadout:
|
for img_url in loadout:
|
||||||
path = download_image(img_url)
|
path = download_image(img_url)
|
||||||
# Convert webp to png
|
frames.append(Image.open(path).convert("RGBA").resize((24, 24)))
|
||||||
dwebp(input_image=path, output_image=f"{path}.png", option="-o")
|
|
||||||
frames.append(Image.open(path).resize((24, 24)))
|
|
||||||
|
|
||||||
gif_path = rel_to_abspath("../temp.gif")
|
gif_path = rel_to_abspath("../temp.gif")
|
||||||
frames[0].save(
|
frames[0].save(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue