From d13006ce95294e0b11c0ce4d70a82a99fad2b595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Mon, 10 Oct 2022 20:24:37 +0000 Subject: [PATCH] Lena-Bilder --- api/advent22_api/routers/days.py | 6 +++--- api/lena.jpg | 3 +++ api/lena2.jpg | 3 +++ 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 api/lena.jpg create mode 100644 api/lena2.jpg diff --git a/api/advent22_api/routers/days.py b/api/advent22_api/routers/days.py index 8d020a8..4fb8018 100644 --- a/api/advent22_api/routers/days.py +++ b/api/advent22_api/routers/days.py @@ -64,7 +64,7 @@ async def load_picture_standard() -> Image.Image: """ # Bild laden - img = Image.open("hand.png") + img = Image.open("lena2.jpg") # Größen bestimmen width, height = img.size @@ -189,10 +189,10 @@ async def get_picture_for_day( # Bilddaten in Puffer laden img_buffer = BytesIO() - img.save(img_buffer, format="PNG", quality=85) + img.save(img_buffer, format="JPEG", quality=85) img_buffer.seek(0) return StreamingResponse( content=img_buffer, - media_type="image/png", + media_type="image/jpg", ) diff --git a/api/lena.jpg b/api/lena.jpg new file mode 100644 index 0000000..a11652b --- /dev/null +++ b/api/lena.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:27500c652ce289807a857e2841f5021ab3204b7334ab1717aac55bd7eb2f3e37 +size 73024 diff --git a/api/lena2.jpg b/api/lena2.jpg new file mode 100644 index 0000000..db76e58 --- /dev/null +++ b/api/lena2.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aca2a3f14184a275b86a48d2cb6d91d7c93b76b28164afb0192963d4ea53c1ca +size 245685