image-pluser-webui/methods/bulk_methods.py
2023-04-16 10:46:55 +03:00

14 lines
284 B
Python

from PIL import Image, ImageFilter
def canny_edge(file_name):
image = Image.open(file_name)
image = image.convert("L")
return image.filter(ImageFilter.FIND_EDGES)
def sharpen(file_name):
image = Image.open(file_name)
return image.filter(ImageFilter.SHARPEN)