Compare commits

...

2 Commits

Author SHA1 Message Date
rottenwheel
8cc9051148
Merge pull request #59 from recanman/master
feat: compress cover image
2024-09-02 09:24:31 -05:00
recanman
220673484a feat: compress cover image 2024-08-31 21:02:45 -07:00

View File

@ -6,7 +6,7 @@ import argparse
import datetime
import tempfile
import tomllib
from PIL import Image
def get_period_string(
start: datetime.datetime,
@ -124,6 +124,9 @@ def create_issue_image(
]
)
image = Image.open(f"content/weekly/issue-{issue_number}/cover.png")
image = image.convert("RGB").quantize(colors=256)
image.save(f"content/weekly/issue-{issue_number}/cover.png", "PNG", compress_level=9)
def get_latest_issue() -> int:
"""Get the latest issue number from the weekly directory