Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python pillow cut image in half

from PIL import Image

original = Image.open(test_image)

width, height = original.size

wid = int(width / 2)

img = original.crop((0, 0, wid, height))

img.show()
Comment

PREVIOUS NEXT
Code Example
Python :: how to pass parameters in python script 
Python :: roman to integer 
Python :: Command errored out with exit status 1: 
Python :: python optional arguments 
Python :: np append row 
Python :: python if condition assignment in one line 
Python :: import python script from another directory 
Python :: pyspark dataframe to parquet 
Python :: camel case in python 
Python :: remove multiindex pandas 
Python :: how to remove none in python 
Python :: soap 1.2 request python 
Python :: list exclude list 
Python :: pydrive upload file to folder 
Python :: django deployment 
Python :: unique list values python ordered 
Python :: xargs to copy file from text files to another directory 
Python :: print python float precision 
Python :: Custom x, y-ticks using plt 
Python :: geopandas legend location 
Python :: create 8ball command in discord.py 
Python :: assert python 
Python :: pandas remove time from date 
Python :: buttons on canvas tkinter 
Python :: python last 3 list elements 
Python :: pands correlation matrix to dataframe 
Python :: discord.py embed 
Python :: spacy tokineze stream 
Python :: add key if not exists python 
Python :: python tkinter grid 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =