Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Convert JPG -> PNG -> INVERTED
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 =
inv = PIL.ImageOps.invert(im) #invert opperation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment