13. ImageFilter Smooth


13.1. Smooth

Use the Image.filter(ImageFilter.SMOOTH) method to smooth an image.
from PIL import Image, ImageFilter

with Image.open("test_images/alph_blocks.png") as im:
    new_im = im.filter(ImageFilter.SMOOTH)
    new_im.save("filters/smooth.png")
Unfiltered, smooth and smooth more are compared below:
../_images/compare_smooth_more.png