【发布时间】:2016-12-20 00:46:30
【问题描述】:
我正在尝试拍摄图像并从 imagemagick http://www.imagemagick.org/Usage/transform/#polaroid 添加以下效果。我搜索了 Python 代码示例并没有成功。我不需要使用 imagemagick(wand, pythonmagick, etc.) 这只是我能找到的唯一例子。我不想使用列出的命令行示例。我希望能够将它包含在我的照相亭 python 代码中。
【问题讨论】:
-
您为什么不想使用基于子流程/命令行的方法?这是最简单、最强大的(访问所有选项)。 Wand 似乎不支持它(宝丽来),Pythonmagick 甚至没有在我的系统上编译,我不知道这些库交织在一起有多深(支持一切)。使用 python 的tempfile,基于 cli 的方法可能非常干净。
-
我不熟悉 python 的 tempfile 模块。你有没有一个例子可以在 python 脚本中干净地运行宝丽来命令?
标签: python imagemagick python-imaging-library imagemagick-convert pythonmagick