python - cx_freeze 通过 Python Wand (imagemagick)

标签 python imagemagick cx-freeze magickwand wand

Wand 需要 ImageMagick 库才能执行。当我按照他们的解释做时here我的代码在我的计算机上运行得很好。

但是,当我使用 cx_freeze 卡住它时,它会丢失额外的库。我不知道如何将该库添加到 zip 中。我知道如何将 .dll 文件添加到文件夹中,但我无法确定 Wand 需要哪个 .dll。当我尝试将所有 .dll 放入它运行的文件夹中时,但无法转换图像。

更新:

因此,我将 CORE_RL_wand_*.dllCORE_RL_magick_*.dll 包含在该文件夹中。运行它时出现错误:

can't start because CORE_RL_bzlib_.dll is missing

我根据需要添加了 1 个和另外 20 个。之后应用程序启动,但是当我尝试打开图像并调整大小和隐藏图像时,我得到:

wand\resource.py line 223, wand.exception.MissingDelegateError: NoDecodeDelegateForThisImageFormat 'pathblah.jpg' @ error/constitute.c/ReadImage/552

我不知道如何摆脱这个。

最佳答案

您需要将 CORE_RL_wand_*.dllCORE_RL_magick_*.dll 包含到 zip 中。

关于python - cx_freeze 通过 Python Wand (imagemagick),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17242439/

相关文章:

imagemagick - 如何提高ImageMagick裁剪图像的性能?

php - 如何保存 Imagemagick 转换

python - cx_freeze windows 32 程序无法运行

python - .exe去其他地方后消失了

python - matplotlib 中许多变量的累积图?

Python:分割从命令行读取的值的有效方法

python - PyPI 包装 : install_requires `pillow`

node.js - Grunt.js - Grunt-favicons 输出

python - 在 Mac 上使用 cx_Freeze

Python:解析和分组目录中的文件名