Python PIL | copy() method
PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. PIL.Image.copy() method copies the image to another image object, this method is useful when we need to copy the image but also retain the original.
Syntax:Image.copy() Parameters: no arguments Returns:An image object
# Importing Image module from PIL package from PIL import Image # creating a image object im1 = Image.open(r"C:\Users\sadow984\Desktop\i3.PNG") # copying image to another image object im2 = im1.copy() # shows the copied image im2.show() |
chevron_right
filter_none
Output:

# Importing Image module from PIL package from PIL import Image # creating a image object im1 = Image.open(r"C:\Users\sadow984\Desktop\i3.PNG") # copying image to another image object im2 = im1.copy() # shows the original image im1.show() |
chevron_right
filter_none
Output:
Recommended Posts:
- copy in Python (Deep Copy and Shallow Copy)
- Python list | copy() method
- Python | shutil.copy() method
- set copy() in python
- Python Dictionary copy()
- numpy.ndarray.copy() in Python
- Python | Pandas Index.copy()
- Python | Pandas TimedeltaIndex.copy
- Python | Ways to Copy Dictionary
- Python | Numpy matrix.copy()
- Python | How to copy a nested list
- Python | How to copy data from one excel sheet to another
- Python | Move or Copy Files and Directories
- Python | Pandas tseries.offsets.CustomBusinessHour.copy
- Python | Difference between Pandas.copy() and copying through variables
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.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.



