bigger albums
This commit is contained in:
+1
-1
@@ -65,7 +65,7 @@ def get_and_dither_image(url, instance, attribute):
|
||||
r = get(url)
|
||||
print(r.content)
|
||||
i = Image.open(BytesIO(r.content))
|
||||
i = i.resize(size=(128, 128)).convert("P").quantize(colors=32)
|
||||
i = i.resize(size=(256, 256)).convert("P").quantize(colors=32)
|
||||
buffer = BytesIO()
|
||||
i.save(fp=buffer, format='PNG')
|
||||
file = InMemoryUploadedFile(ContentFile(buffer.getvalue()), None, instance.name + ".png", "image/png", buffer.tell, "utf-8")
|
||||
|
||||
Reference in New Issue
Block a user