Created
February 17, 2021 14:41
-
-
Save BilHim/f5e190f94e0c15379f71fbcb3bb1e529 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
# Open image | |
image = Image.open('image.jpg') | |
# Filter | |
def filter(image): | |
# Get image dimesions | |
width, height = image.size | |
# Create a white RGB image | |
new_image = Image.new("RGB", (width, height), "white") | |
# Filter magic happens here | |
return new_image | |
# Show result | |
new_image = filter(image) | |
new_image.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment