Open vibertthio opened 6 years ago
... crop = img[max(0, extra // 2 + 1):min(-1, -(extra // 2)), :] ...
The result will not be a square when extra is 1. For example, the crop is img[1:-1, :] when extra is 1.
crop
img[1:-1, :]
extra
It should be:
... crop = img[extra // 2:-(extra // 2) - 1, :] ...
The result will not be a square when extra is 1. For example, the
crop
isimg[1:-1, :]
whenextra
is 1.It should be: