mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-16 13:08: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')
|
||||
|
||||
if str(default) == 'pagan':
|
||||
img = pagan.Avatar(kwargs['digest'])
|
||||
paganobj = pagan.Avatar(kwargs['digest'])
|
||||
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)
|
||||
return HttpResponse(
|
||||
data,
|
||||
|
||||
Reference in New Issue
Block a user