from PIL import Image
im = Image.open('whatever.png')
width, height = im.size
image = PIL.Image.open("sample.png")
width, height = image.size
from PIL import Image
im = Image.open('data/src/lena.jpg')
print(im.size)
print(type(im.size))
# (400, 225)
# <class 'tuple'>
w, h = im.size
print('width: ', w)
print('height:', h)
# width: 400
# height: 225
Code Example |
---|
:: |
:: initialize pandas dataframe with column names |
:: python find files recursive |
Python :: |
:: python clone object |
Python :: |
:: |
Python :: python dns pip |
Python :: |
:: |
:: |
:: |
:: |
:: |
Python :: |
:: how to open local html file in python |
Python :: |
Python :: standardize columns in pandas |
Python :: |
:: |
Python :: .astype datetime |
:: |
Python :: how to find if a value is even or odd in python |
Python :: plt.clear |
:: df select rows based on condition |
Python :: nltk stop words |
Python :: |
Python :: python pie chart with legend |
:: |
:: |