Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. from PIL import Image
  2. import PIL.ImageOps
  3. #Using PIL/pillow (install with 'pip3 install pillow' )
  4. name = 'RPS-g2.jpg'
  5. outname = 'RPS-g2.png' #png extension
  6. im = Image.open(name)
  7. inv = PIL.ImageOps.invert(im) #invert opperation
  8. inv.save(outname)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement