The problem is with logic, not Pillow. Pillow is nearly 100% PIL compatible. You created an image of 0 * 0
(left = right & top = bottom
) size. No display can show that. My code is as follows
from PIL import Image
test_image = "Fedora_19_with_GNOME.jpg"
original = Image.open(test_image)
original.show()
width, height = original.size # Get dimensions
left = width/4
top = height/4
right = 3 * width/4
bottom = 3 * height/4
cropped_example = original.crop((left, top, right, bottom))
cropped_example.show()
Most probably this is not what you want. But this should guide you towards a clear idea of what should be done.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…