Created
January 31, 2019 14:29
-
-
Save morawi/4e0bac0a86b287860a6726cb21bb9b26 to your computer and use it in GitHub Desktop.
Arithmetic operations on PIL images
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 | |
img = Image.open("bride.jpg") | |
img.show() | |
img = Image.eval(img, lambda px: (px**2) % 255) # f = f^2 % 255 | |
img.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment