如何在GAE上过滤图像?

Com*_*eer 2 python google-app-engine image

我正在使用python谷歌应用程序引擎应用程序,我正在使用python2.5,我想处理GAE上的图像(过滤器图像),最初我尝试了智能PIL库,我成功安装它,我测试它,它的工作原理正确地在我的计算机上,但是当我在localhost上测试它(在GAE上运行)时,我有一个错误NotImplementedError: Unable to find the Python PIL library,然后我尝试使用Images Python API处理图像,如本教程:https://developers.google.com/appengine/docs/python/images/overview,我测试了调整大小图像服务,它工作正常,但我想要的主要应用是过滤图像,问题是:如果图像支持此服务(图像过滤) GAE中的Python API?如果没有,我如何在GAE上过滤图像?我看到PIL中有这个服务,我测试了它,但是python2.5中GAE不支持这个库

编辑:

我尝试使用python2.7在GAE上使用PIL库作为https://developers.google.com/appengine/docs/python/python27/using27#Configuring_Libraries,我安装了PIL 1.1.7,并配置了app.yaml文件如:

application: app_id
version: 1
runtime: python27
api_version: 1
threadsafe: false
handlers:
- url: /.*
  script: main.py
libraries:
- name: PIL
  version: "1.1.7"
Run Code Online (Sandbox Code Playgroud)

现在我如何在main.py页面中使用这个库?我试过from PIL import Image,但问题仍然是:

No module named PIL 
      args = ('No module named PIL',) 
      message = 'No module named PIL'
Run Code Online (Sandbox Code Playgroud)

提前致谢.

Gre*_*reg 6

使用python2.5,PIL本身不可用.内置映像模块使用看起来像PIL的API,并且使用SDK(在您的计算机上)PIL用于兼容性,因此您需要安装它.docs(上一个链接)有关于如何在windows/mac/linux上执行此操作的说明.

使用python2.7,您需要将应用配置为在部署后使用PIL的应用引擎版本.在本地,您还需要在应用程序文件夹之外自己安装PIL.