How to Solve NameError: name 'ImageOps' is not defined -- PIL

Solution: Import the 'ImageOps' module

# Add the following line to the top of your code
from PIL import ImageOps

 

For more information:
PIL ImageOps