Question: In this challenge, you will be modifying the interleave function from the previous question such that the interleaved image is stored into a new image

In this challenge, you will be modifying the interleave function from the previous question such that the interleaved image is stored into a new image instead of changing the original image (i.e. img_1). Your Task: 1. In lab8_2.py, modify the interleave () function from the previous question to create a copy of the original image to store the result. To create a new image without modifying the parameters you could do ONE of the following: - Use the create_img function to create a new image - Create an empty image and append rows of pixels as seen in this copy() example 2. In lab8_2_test.py, write code to load the two images provided in the images folder, interleave them using the function provided and save the resultant image in the images folder. 3. In lab8_2_test.py, compare the values of the image returned by the interleave() function and the first image we uploaded. Use the id() function to compare and check if both the images are different or the same object in memory. What is the output of this program, and why? Discuss with your partner or with a tutor/TA. id() function in Python: https://www.toppr.com/guides/python-guide/references/methods-andfunctions/methods/built-in/python-id/ In this challenge, you will be modifying the interleave function from the previous question such that the interleaved image is stored into a new image instead of changing the original image (i.e. img_1). Your Task: 1. In lab8_2.py, modify the interleave () function from the previous question to create a copy of the original image to store the result. To create a new image without modifying the parameters you could do ONE of the following: - Use the create_img function to create a new image - Create an empty image and append rows of pixels as seen in this copy() example 2. In lab8_2_test.py, write code to load the two images provided in the images folder, interleave them using the function provided and save the resultant image in the images folder. 3. In lab8_2_test.py, compare the values of the image returned by the interleave() function and the first image we uploaded. Use the id() function to compare and check if both the images are different or the same object in memory. What is the output of this program, and why? Discuss with your partner or with a tutor/TA. id() function in Python: https://www.toppr.com/guides/python-guide/references/methods-andfunctions/methods/built-in/python-id/
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
