Advertisement
skip420

crop

Jun 26th, 2019
362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. from PIL import Image
  2.  
  3. img = Image.open('captcha-001.png')
  4.  
  5. left = 43
  6. top =  1344
  7.  
  8. area = (left, top - 1095, top - 1000, 380)
  9. cropped_img = img.crop(area)
  10. cropped_img.show()
  11.  
  12.  
  13.  
  14. #location : {'y': 1344.0, 'x': 43.0}
  15. #size     : {'width': 300, 'height': 150}
  16. #left     : 43.0
  17. #top      : 1344.0
  18. #right    : 343.0
  19. #bottom   : 1494.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement