Instagram类图像过滤器
instagram-filters的Python项目详细描述
像Instagram一样的图像过滤器。
可与[Instagram客户端](https://bitbucket.org/acoomans/instagram-client)结合使用,以便在应用筛选器后上载图像。
##依赖关系
Instagram过滤器取决于ImageMagick,它可以安装在带有Brew的Mac上:
brew install imagemagick
##安装
python setup.py install
##用法
首先,导入客户端:
from instagram_filters.filters import *
实例化筛选器并应用它:
f = Nashville(“image.jpg”) f.apply()
可用过滤器:
- 哥谭
- 开尔文
- 洛莫
- 纳什维尔
- 烤面包机
注意过滤器会就地更改图像。如果要复制原始图像,请确保在应用任何筛选器之前复制它。
#测试
使用以下命令运行测试:
cd tests python test.py
##学分
这个库的灵感来自于[“用php创建instagram过滤器”tutsplus教程](http://net.tutsplus.com/tutorials/php/create-instagram-filters-with-php/)。