If the image is stored in BlobProperty, the data is stored in the data warehouse, and if profile is your entity, then the height can be accessed as:
from google.appengine.api import images height = images.Image(image_data=profile.avatar).height
If the image is in a block block (blobstore.BlobReferenceProperty in the data store), then you have 2 ways to do this, the best way is complicated and requires getting a reader for the blob and passing it to the exif reader to get the size. A simpler way:
if avatar = db.BlobReferenceProperty() and profile is your entity, then:
from google.appengine.api import images img = images.Image(blob_key=str(profile.avatar.key()))
Amir
source share