diff --git a/pyproject.toml b/pyproject.toml index 1c73c84..2be829e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,7 @@ classifiers = [ ] dependencies = [ + "importlib-resources", "Pillow>=9.1.0", "waveshare-epd @ git+https://github.com/waveshareteam/e-Paper.git#subdirectory=RaspberryPi_JetsonNano/python&egg=waveshare-epd", "inky[rpi]>=1.3.1", diff --git a/src/omni_epd/virtualepd.py b/src/omni_epd/virtualepd.py index 7de178f..0077099 100644 --- a/src/omni_epd/virtualepd.py +++ b/src/omni_epd/virtualepd.py @@ -25,7 +25,7 @@ import io import re import itertools -from importlib import resources +from importlib_resources import path from PIL import Image, ImageEnhance, ImageColor from . conf import EPD_CONFIG, IMAGE_DISPLAY, IMAGE_ENHANCEMENTS from . errors import EPDConfigurationError @@ -243,7 +243,7 @@ def _ditherImage(self, image, dither): # format palette the way didder expects it palette = [",".join(map(str, x)) for x in colors] palette = " ".join(palette) - with resources.path("omni_epd", "didder") as p: + with path("omni_epd", "didder") as p: didder = p cmd = [didder, "--in", "-", "--out", "-", "--palette", palette]