Skip to content

Commit

Permalink
add pillow-heif
Browse files Browse the repository at this point in the history
  • Loading branch information
adriankeenan committed Jan 1, 2025
1 parent 0a0d3ad commit 0beae35
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
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

0 comments on commit 0beae35

Please sign in to comment.