Python | Copy and Paste Images onto other Image using Pillow Last Updated : 18 Jan, 2022 Comments Improve Suggest changes Like Article Like Report In this article, we will learn how to copy an image over another image using pillow library. We will use image module from pillow and copy() and paste() methods to achieve this task. We will need to create copies of both images so that it does not affect the original image with the help of copy() method and then paste the image on the other image with the help of paste() method.Input images - Image1: [caption id="attachment_1166629" align="alignnone" width="225"] Image2: Example 1: Python3 # import image module from pillow from PIL import Image # open the image Image1 = Image.open('D:\cat.jpg') # make a copy the image so that the # original image does not get affected Image1copy = Image1.copy() Image2 = Image.open('D:\core.jpg') Image2copy = Image2.copy() # paste image giving dimensions Image1copy.paste(Image2copy, (0, 0)) # save the image Image1copy.save('D:\pasted2.png') Output: Example 2: Changing parameters to place the Image2 on face of the cat in the Image1. Python3 # import image module from pillow from PIL import Image # open the image Image1 = Image.open('D:\cat.jpg') # make a copy the image so that # the original image does not get affected Image1copy = Image1.copy() Image2 = Image.open('D:\core.jpg') Image2copy = Image2.copy() # paste image giving dimensions Image1copy.paste(Image2copy, (70, 150)) # save the image Image1copy.save('D:\pasted2.png') Output: Comment More infoAdvertise with us Next Article Python | Copy and Paste Images onto other Image using Pillow D DeepakDev Follow Improve Article Tags : Python Python Programs Python-pil Practice Tags : python Similar Reads How to compress images using Python and PIL? There are organizations who receive data form lakhs or more persons, which is mostly in form of text, with a few images. Most of you know that the text part is stored in databases in the form of tables, but what about the images? The images are small compared to the textual data but constitute a muc 3 min read Python Nameerror: Name 'Imagedraw' is Not Defined Python, being a versatile and dynamic programming language, is widely used for various applications, including image processing. However, as with any programming language, errors can occur. One common issue that developers encounter is the "NameError: name 'ImageDraw' is not defined." This error can 3 min read Check If A File is Valid Image with Python When working with images in Python, it's crucial to ensure the integrity and validity of the files being processed. Invalid or corrupted image files can lead to unexpected errors and disruptions in your applications. In this article, we will explore different methods to check if a file is a valid im 3 min read Convert an image into jpg format using Pillow in Python Let us see how to convert an image into jpg format in Python. The size of png is larger when compared to jpg format. We also know that some applications might ask for images of smaller sizes. Hence conversion from png(larger ) to jpg(smaller) is needed. For this task we will be using the Image.conve 2 min read Python | Crop image using pillow In this article, we will learn to crop an image using pillow library. Cropping an image means to select a rectangular region inside an image and removing everything outside the rectangle. To crop an image we make use of crop() method on image objects. Syntax : IMG.crop(box_tuple) Parameters : Image_ 1 min read Like