PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The
Image module provides a class with the same name which is used to represent a PIL image. The module also provides a number of factory functions, including functions to load images from files, and to create new images.
Image.point() Maps this image through a lookup table or function.
Syntax: Maps this image through a lookup table or function.
lut – A lookup table, containing 256 (or 65336 if self.mode==”I” and mode == “L”) values per band in the image. A function can be used instead, it should take a single argument. The function is called once for each possible pixel value, and the resulting table is applied to all bands of the image.
mode – Output mode (default is same as input). In the current version, this can only be used if the source image has mode “L” or “P”, and the output has mode “1” or the source image mode is “I” and the output mode is “L”.
Returns: An Image object.
Another Example:Here changing threshold value.
- class method vs static method in Python
- Python | os.dup() method
- Python | next() method
- Python | set() method
- Python | Tensorflow abs() method
- Python | sympy.det() method
- Python | os.get_exec_path() method
- Python | os.getenvb() method
- Python | os.getppid() method
- Python | os.ctermid() method
- Python | os.getgroups() method
- Python | os.getcwdb() method
- Python: filecmp.cmp() method
- Python PIL | ImageOps.fit() method
- Python PIL | UnsahrpMask() method
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.