Advertisement
Guest User

Untitled

a guest
Jun 25th, 2018
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. from PIL import Image
  2.  
  3. def crop(image_path, coords, save_name):
  4.  
  5.     image = Image.open(image_path)
  6.     cropped_image = image.crop(coords)
  7.     cropped_image.show()
  8.  
  9. if __name__ == '__main__':
  10.     crop('img.jpg',(161,166,706,1050), 'nimg.jpg')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement