Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for HEIC images #2

Merged
merged 1 commit into from
Jan 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ spidev
gpiozero
Flask~=3.0.3
pillow~=10.4.0
pillow-heif~=0.21.0
5 changes: 5 additions & 0 deletions src/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
from pathlib import Path

from flask import Flask, request, jsonify, send_file, Response

from PIL import Image, UnidentifiedImageError
from pillow_heif import register_heif_opener

import logging

Expand All @@ -11,11 +13,14 @@
from img_utils import resize_img, image_changed
from epd_utils import handle_epd_error, display_clear, display_img, get_epd


IMG_PATH = 'img.png'
DISPLAY_RESOLUTION = Resolution(800, 480)

logging.basicConfig(level=logging.DEBUG)

register_heif_opener()

epd = get_epd()

app = Flask(__name__)
Expand Down
Loading