from PIL import Image
im = Image.open(f) #the size is 500x350
box = (0,0,100,100)
kay = im.crop(box)
It seems like there’s nothing wrong with this, right?
That last line will result in an error and won’t continue, but I don’t know what the error is because it’s AJAX and I can’t debug ATM.
If your controller is dealing with strings because the crop data is coming in via an ajax GET, it might be worth trying to make them into integers before applying the crop. Example from my terminal…