def crop_img(path):
im = add_imgs(path)
size_max = 1800
width, height = im.size
number = 1
while height>size_max:
save = im.crop((0, 0, width, size_max))
save.save(f"D:\\\{'{:03}'.format(number)}.jpg")
im = im.crop((0, size_max, width, height))
height -= size_max
print(number, height)
number += 1
print(number)
im = im.crop((0, 0, width, height))
im.save(f"D:\\\{'{:03}'.format(number)}.jpg")