Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from PIL import Image
- img = Image.open('captcha-001.png')
- left = 43
- top = 1344
- area = (left, top - 1095, top - 1000, 380)
- cropped_img = img.crop(area)
- cropped_img.show()
- #location : {'y': 1344.0, 'x': 43.0}
- #size : {'width': 300, 'height': 150}
- #left : 43.0
- #top : 1344.0
- #right : 343.0
- #bottom : 1494.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement