Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement