G
G
gelerum2021-11-09 10:34:39
Python
gelerum, 2021-11-09 10:34:39

How to increase the size of pixel art without blurring the edges?

I don’t know exactly what it is called, but this editor https://www.pixilart.com/draw has a similar functionality when exporting a drawing. If used from the pillow resize() library, then the edges of the stroke in pixel art are smeared.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
ScriptKiddo, 2021-11-09
@gelerum

from PIL import Image

im = Image.open("source.png").convert('RGBA')
im = im.resize((100, 100), resample=Image.NEAREST)
im.save("result.png")

https://stackoverflow.com/a/53172086
source.png
618a43110d0a4552527414.png
result.png
618a43224613b243004401.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question