Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

PIL image reisze code example

Example 1: python pil resize image

from PIL import Image

# Image.open() can also open other image types
img = Image.open("some_random_image.jpg")
# WIDTH and HEIGHT are integers
resized_img = img.resize((WIDTH, HEIGHT))
resized_img.save("resized_image.jpg")

Example 2: pil resize image

im = Image.open('image.jpg')  
im = im.resize((w, h))

Tags:

Python Example

Related

install nodemone in dev dependency code example django message tags code example flutter if statements block code example fresh install of mariadb code example roation of array code example linux grep in folder code example psr12 code example how to input type number in html code example document what a function does typescript code example how to check if a value is in a column pandas code example expo-server-sdk npm code example laravel enable auth code example

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy