Get image width & height
import sys
sys.path.append("/usr/local/lib/python2.7/site-packages")
from PIL import Image
image_file = "french_flag.bmp"
img = Image.open(image_file)
width, height = img.size # get the image's width and height in pixels
Voila !
Written by Bolo Michelin
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Python
Authors
Related Tags
#python
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#