clone() function makes an exact copy of the original image. One can use this clone image to manipulate without affecting the original image. clone() is one of the most important function because it helps in safe manipulation of image.
For example, If you get an image and you mess up with the original file, this may leads to a huge loss to a person. But this problem can be avoided using clone() function. Before performing manipulation in image one can create an exact copy of image and manipulate the copy of original file.
original = Image(filename='filename.format') copy = original.clone() // other manipulation code
with Image(filename='filename.format') as original: with original.clone() as copy: // other image manipulation code
Let’s write a code to clone an image and then change the format of the cloned image.
A copy image will be saved with png extension/format
- Wand selective_blur() function in Wand python
- Python - Read blob object in python using wand library
- turtle.clone() function in Python
- Wand function() function in Python
- How to clone a method code in Python?
- How to Clone webpage Using pywebcopy in Python?
- Wand image - Baseimage.kuwahara() function in Python
- Wand image.edge function in Python
- Wand gaussian_blur() function in Python
- Wand transform() function in Python
- Wand crop() function in Python
- Wand rotational_blur() function in Python
- Wand - blur() function in Python
- Python - Image() function in Wand
- Python - shade() function in Wand
- Python - sharpen() function in Wand
- Wand adaptive_sharpen() function in Python
- Python - noise() function in Wand
- Python - blue_shift() function in Wand
- Python - color_matrix() function in Wand
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.