Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pillow python crop

im = Image.open('image.jpg') 
im = im.crop((left, top, width, height))

#       ├─input image width─┤
#   ┬   ┌───────────────────┐ ┬   ┬   
#   │   │                   │top  │   
# input │       ┌───────┐   │ ┴ height
# image │       │       │   │     │   
# height│       └───────┘   │     ┴   
#   │   │                   │  
#   ┴   └───────────────────┘   
#       ├─left─┤
#       ├─────width─────┤
 
PREVIOUS NEXT
Tagged: #pillow #python #crop
ADD COMMENT
Topic
Name
1+3 =