November 2018
Intermediate to advanced
492 pages
12h 19m
English
We can use the crop() function with the desired rectangle argument to crop the corresponding area from the image, as shown in the following code:
im_c = im.crop((175,75,320,200)) # crop the rectangle given by (left, top, right, bottom) from the imageim_c.show()
The next figure shows the cropped image created using the previous code:

Read now
Unlock full access