Cropping an Image

The PIL provide Image.crop() for cutting out an area of an image.

Set the cropping area with box = (left, upper, right, lower).

The top left coordinates correspond to (x,y) = (left, upper),

and the bottom right coordinates correspond to (x,y) = (right, lower).

Posted on July 17, 2021 Tags: