Last active
September 9, 2020 08:12
-
-
Save dietercastel/7caf92a37546ff8bcf7b15bae8e9c08d to your computer and use it in GitHub Desktop.
Convert JPG -> PNG -> INVERTED
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 | |
| import PIL.ImageOps | |
| #Using PIL/pillow (install with 'pip3 install pillow' ) | |
| name = 'RPS-g2.jpg' | |
| outname = 'RPS-g2.png' #png extension | |
| im = Image.open(name) | |
| inv = PIL.ImageOps.invert(im) #invert opperation | |
| inv.save(outname) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment