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.
PIL.Image.eval() Applies the function (which should take one argument) to each pixel in the given image. If the image has more than one band, the same function is applied to each band. Note that the function is evaluated once for each possible pixel value, so you cannot use random components or other generators.
Syntax: PIL.Image.eval(image, *args)
image – The input image.
function – A function object, taking one integer argument.
Returns type: An image.
Another example: Here we change the argument value for another image.
Image Used –
- Python PIL | ImageMath.eval() Method
- eval in Python
- Python | Pandas dataframe.eval()
- Difference between Method Overloading and Method Overriding in Python
- class method vs static method in Python
- Python | set() method
- Python | os.dup() method
- Python | next() method
- Python | os.setregid() method
- Python | os.pwrite() method
- Python | os.pipe() method
- Python | os.tcgetpgrp() method
- Python | after method in Tkinter
- Python | os.getpgrp() method
- Python | os.getpgid() method
- Python | os.getsid() method
- Python | os.setreuid() method
- Python | os.fork() method
- Python PIL | GaussianBlur() method
- Python | os.getgrouplist() 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 firstname.lastname@example.org. 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.