mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-17 05:28:03 +00:00
Make sure we do the pagan avatar in the right size
This commit is contained in:
@@ -167,9 +167,10 @@ class AvatarImageView(TemplateView):
|
|||||||
content_type='image/png')
|
content_type='image/png')
|
||||||
|
|
||||||
if str(default) == 'pagan':
|
if str(default) == 'pagan':
|
||||||
img = pagan.Avatar(kwargs['digest'])
|
paganobj = pagan.Avatar(kwargs['digest'])
|
||||||
data = BytesIO()
|
data = BytesIO()
|
||||||
img.img.save(data, 'PNG', quality=JPEG_QUALITY)
|
img = paganobj.img.resize((size, size), Image.ANTIALIAS)
|
||||||
|
img.save(data, 'PNG', quality=JPEG_QUALITY)
|
||||||
data.seek(0)
|
data.seek(0)
|
||||||
return HttpResponse(
|
return HttpResponse(
|
||||||
data,
|
data,
|
||||||
|
|||||||
Reference in New Issue
Block a user