Split a PIL image into multiple regions with a patch included in one of the split region
I wish to write a python code that accepts a PIL image and split the image into M rows and N columns, such that one of the split region completely contains a patch of height H and width W starting at point (p,q).