Question: Python help input a parameter in the function for image manipulation def rotate(): for x in range(w): for y in range(h): px = img.getpixel((x, y))
Python help input a parameter in the function for image manipulation
def rotate():
for x in range(w):
for y in range(h):
px = img.getpixel((x, y))
target_x = (h - 1) - y
img.putpixel((target_x, x), px)
rotate()
img.save("rotate.jpeg")
I need to use the parameter "img" and "degrees" degrees will be 90, 180 or 270
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
