from PIL import Image, ImageFilter # Import classes from the library.
original_image = Image.open("file.ppm") # Load an image from the file system.
blurred_image = original_image.filter(ImageFilter.BLUR) # Blur the image.
# Display both images.
original_image.show()
blurred_image.show()
from PIL import Image, ImageFilter
before = Image.open("IMAGE_NAME.file_type")
after = before.filter(ImageFilter.FIND_EDGES)
after.save("IMAGE_NAME.file_type")