mirror of
https://github.com/artegoser/image-pluser-webui.git
synced 2024-11-06 04:33:57 +03:00
14 lines
284 B
Python
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)
|