ensnare
ensnare

Reputation: 42013

Simplest way to calculate the width and height of a jpeg image in Python

How can I calculate the width and height of an image in Python? I'm using the "Image" library already if that makes it easier.

Thanks.

Upvotes: 1

Views: 657

Answers (1)

Klaus Byskov Pedersen
Klaus Byskov Pedersen

Reputation: 120917

im=Image.open(pic) 
print im.size 

Upvotes: 5

Related Questions