mirror of
https://github.com/jazzband/django-avatar.git
synced 2026-05-16 19:41:07 +00:00
Use integer sizes.
This commit is contained in:
parent
29570b1a1b
commit
05ef51078f
1 changed files with 1 additions and 1 deletions
|
|
@ -116,7 +116,7 @@ class Avatar(models.Model):
|
|||
image = image.crop((0, diff, w, h - diff))
|
||||
if image.mode != "RGB":
|
||||
image = image.convert("RGB")
|
||||
image = image.resize((size, size), AVATAR_RESIZE_METHOD)
|
||||
image = image.resize((int(size), int(size)), AVATAR_RESIZE_METHOD)
|
||||
thumb = six.StringIO()
|
||||
image.save(thumb, AVATAR_THUMB_FORMAT, quality=quality)
|
||||
thumb_file = ContentFile(thumb.getvalue())
|
||||
|
|
|
|||
Loading…
Reference in a new issue