The PIL cropping field is defined as the 4-element pixel coordinates: (left, upper, right, lower) .
To fix your code to get a 30x30 crop:
box = (70, 70, 100, 100)
It is broken into components:
x, y, w, h = (70, 70, 30, 30) box = (x, y, x + w, y + h)
samplebias
source share