summaryrefslogtreecommitdiff
path: root/server/szurubooru
diff options
context:
space:
mode:
authorShyam Sunder <sgsunder1@gmail.com>2022-02-07 12:51:25 -0500
committerShyam Sunder <sgsunder1@gmail.com>2022-02-08 09:58:33 -0500
commita22485afda0a37ac1074f5bfea10828c8fef3151 (patch)
treec0961cc4de6a72b6a3287093581a0c0c2aa7df82 /server/szurubooru
parentd5a6609f754b62536a1d884b0d488adab3ee218e (diff)
server/func/images: upgrade to heif-image-plugin
Diffstat (limited to 'server/szurubooru')
-rw-r--r--server/szurubooru/func/image_hash.py5
-rw-r--r--server/szurubooru/func/images.py2
2 files changed, 3 insertions, 4 deletions
diff --git a/server/szurubooru/func/image_hash.py b/server/szurubooru/func/image_hash.py
index 05b27a4..76d5a84 100644
--- a/server/szurubooru/func/image_hash.py
+++ b/server/szurubooru/func/image_hash.py
@@ -4,16 +4,13 @@ from datetime import datetime
from io import BytesIO
from typing import Any, Callable, List, Optional, Set, Tuple
+import HeifImagePlugin
import numpy as np
import pillow_avif
-import pyheif
from PIL import Image
-from pyheif_pillow_opener import register_heif_opener
from szurubooru import config, errors
-register_heif_opener()
-
logger = logging.getLogger(__name__)
# Math based on paper from H. Chi Wong, Marshall Bern and David Goldberg
diff --git a/server/szurubooru/func/images.py b/server/szurubooru/func/images.py
index 4d4011f..e135d18 100644
--- a/server/szurubooru/func/images.py
+++ b/server/szurubooru/func/images.py
@@ -7,6 +7,8 @@ import subprocess
from io import BytesIO
from typing import List
+import HeifImagePlugin
+import pillow_avif
from PIL import Image as PILImage
from szurubooru import errors