Google exif image data

In google app engine dev environment, I cannot get exif data. I followed the guide from here https://developers.google.com/appengine/docs/python/images/imageclass

I did the following in code

def getResizedImage(self, image, imagemaxWidth, imagemaxHeight):
    img = images.Image(image_data=image)
    logging.error(img.get_original_metadata())

I get only None. The img object is beautiful, since I can execute img.resize, etc. I need to get Exif info.

UPDATE: by doing this, I was able to get metadata,

def getResizedImage(self, image, imagemaxWidth, imagemaxHeight):
    img = images.Image(image_data=image)
    img.rotate(0)
    img.execute_transforms()
    logging.error(img.get_original_metadata())

As explained in the documentation, I got a very "limited" set of more precisely this

{u'ImageLength': 480, u'ImageWidth': 640}

-, , , dev env. . pyexiv2 exif, , PIL, . PIL exif.

+5
2

Dev PIL, , . PIL , .

+3

get_original_metadata

Returns:
  dict with string keys. If execute_transform was called with parse_metadata
  being True, this dictionary contains information about various properties
  of the original image, such as dimensions, color profile, and properties
  from EXIF.
  Even if parse_metadata was False or the images did not have any metadata,
  the dictionary will contain a limited set of metadata, at least
  'ImageWidth' and 'ImageLength', corresponding to the dimensions of the
  original image.
  It will return None, if it is called before a successful
  execute_transfrom.

parse_metadata=True execute_transform, , exif.

None , execute_transforms, -

0

All Articles