spe*_*ope 5 python google-app-engine exif
在谷歌应用引擎开发环境中,我无法获得exif数据.我从这里按照指南 https://developers.google.com/appengine/docs/python/images/imageclass
我在代码中完成了以下操作
def getResizedImage(self, image, imagemaxWidth, imagemaxHeight):
img = images.Image(image_data=image)
logging.error(img.get_original_metadata())
Run Code Online (Sandbox Code Playgroud)
我只得到无.img对象很好,因为我可以执行img.resize等.我需要获取Exif信息.
更新:通过这样做,我能够获取元数据,
def getResizedImage(self, image, imagemaxWidth, imagemaxHeight):
img = images.Image(image_data=image)
img.rotate(0)
img.execute_transforms()
logging.error(img.get_original_metadata())
Run Code Online (Sandbox Code Playgroud)
就像在文档中解释的那样,我得到了非常"有限"的设置
{u'ImageLength': 480, u'ImageWidth': 640}
Run Code Online (Sandbox Code Playgroud)
显然你在真实环境中得到了更大的设置,我不知道为什么这不能成为dev env的功能.这非常令人沮丧.只要我能得到pyexiv2级别exif我没关系,但如果它只是使用PIL不够好.目前PIL提供的方式很少exif信息.
| 归档时间: |
|
| 查看次数: |
970 次 |
| 最近记录: |