Skip to content

Commit

Permalink
Use correct resampling constant
Browse files Browse the repository at this point in the history
  • Loading branch information
williammck committed Dec 3, 2024
1 parent 03fca3c commit 7dd1844
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions apps/users/views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import base64
import os
from io import BytesIO

Expand Down Expand Up @@ -64,7 +63,7 @@ def put(self, request, cid):
if "avatar" in request.data:
if request.data.get("avatar"):
img = Image.open(request.data.get("avatar"))
img = img.resize((500, 500), Image.ANTIALIAS)
img = img.resize((500, 500), Image.LANCZOS)

profile_io = BytesIO()
img.save(profile_io, "PNG")
Expand Down

0 comments on commit 7dd1844

Please sign in to comment.