Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Calculate the resolution of an image
- from PIL import Image
- #im = Image.open('myimage.png') #path to image file
- im = Image.open('DR-2.3-smiley.bmp') #path to image file
- width, height = im.size
- resolution = width * height
- print("The image resolution is: ", width, " x ", height)
- print("The resolution is: ", resolution)
Advertisement
Add Comment
Please, Sign In to add comment