Skip to content

Commit

Permalink
Replace ANTIALIAS with LANCZOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Grennith committed Jul 28, 2023
1 parent 7984c5f commit 68372fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
default-libmysqlclient-dev \
pkg-config \
libmariadb-dev \
# OpenCV & dependencies
python3-opencv \
libsm6 \
Expand Down
4 changes: 2 additions & 2 deletions mapadroid/utils/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import time

import ujson
from PIL import Image
from aiocache import cached
from aiofile import async_open
from PIL import Image

import mapadroid
from mapadroid.utils.logging import LoggerEnums, get_logger
Expand Down Expand Up @@ -38,7 +38,7 @@ def _process_image_resize(image, savepath, width):
with Image.open(image) as img:
wpercent = (basewidth / float(img.size[0]))
hsize = int((float(img.size[1]) * float(wpercent)))
img = img.resize((basewidth, hsize), Image.ANTIALIAS)
img = img.resize((basewidth, hsize), Image.LANCZOS)
pre, _ = os.path.splitext(filename)
img.save(os.path.join(savepath, str(pre) + '.jpg'))

Expand Down

0 comments on commit 68372fe

Please sign in to comment.