Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from PIL import Image
- def crop(image_path, coords, save_name):
- image = Image.open(image_path)
- cropped_image = image.crop(coords)
- cropped_image.show()
- if __name__ == '__main__':
- crop('img.jpg',(161,166,706,1050), 'nimg.jpg')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement