I am trying to use PIL in python to remove parts of images based on the pixels RGB values. From the documentation it would seem that the function point could do what I\'m lo
Something like the following would work:
source = im.split() mask = source[2].point(lambda i: i < 100 and 255) im = Image.merge(im.mode, source)
See the PIL Tutorial under the Point Operations heading for more information.