Article index:
- 1 – Pillow Installation
- 2 – Pillow Version
- 3 – Image Loading and Saving
- 4 – Reading the pixels
- 5 – Image Processing
- 6 – Image Processing Operations
- 7 – Adding a watermark
6 – Image Processing Operations
Pillow image processing operations are available via the ImageOps module. ImageOps exposes image processing functions such as crop(), colorize(), flip(), grayscale(), invert(), mirror(), solarize(), or posterize().
from PIL import Image from PIL import ImageOps im = ImageOps.solarize(im0, 128) #im = ImageOps.posterize(im0, 1)
The full demo is available in moon3d/gl-210-python-pil-pillow/pillow_image_ops.xml. Just load it in GLSL Hacker and you should get:
ImageOps.solarize()
Article index: