Question: 1 5 . Add Image Transposition The function transpose does not have any parameters other than image. Implement this function as specified. It is very

15. Add Image Transposition
The function transpose does not have any parameters other than image. Implement this function as specified. It is very similar to the function of the same name shown in the videos for the module Programming with Nested Lists. Download this function from the Canvas page if you need a hint.
This function will look like it rotates the image, but its slightly different. It actually rotates and flips. You should test it out on the less symmetrical images. For example, the command
python pictool.py transpose images/Japan.png Japan2.png
should perform the following conversion:
def transpose(image):
"""
Returns True after transposing the image
All plug-in functions must return True or False. This function returns True
because it modifies the image. It transposes the image, swaping colums and rows.
Transposing is tricky because you cannot just change the pixel values; you have
to change the size of the image table. A 10x20 image becomes a 20x10 image.
The easiest way to transpose is to make a transposed copy with the pixels from
the original image. Then remove all the rows in the image and replace it with
the rows from the transposed copy.
Parameter image: The image buffer
Precondition: image is a 2d table of RGB objects
"""
# Change this to return True when the function is implemented
return False

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!