我正在尝试使用 magick 命令行工具转换文件,但我对错误的含义以及如何修复它感到困惑。
我使用了以下代码语法:
magick <input>.webp <output>.jpg
我得到这个错误:
magick: delegate failed `'dwebp' -pam '%i' -o '%o'' @ error/delegate.c/InvokeDelegate/1911.
magick: unable to open file '/tmp/magick-PGSTH7P1-9rGkrCgVJrwRyuTCjBoRkrJ': No such file or directory @ error/constitute.c/ReadImage/780.
我正在转换的文件在我的当前目录中,我没有使用目录中已经使用的文件名。我已经确定我的拼写是正确的,我的文件类型也是正确的。
安装过程中也没有错误:
我在虚拟机(Ubuntu 22.04)上运行它
我再次测试了这个,发现我需要:
sudo apt install build-essential pkg-config webp libwebp-dev libwebp7
然后您需要按照其余说明从源代码构建:
./configure
make -j 4
sudo make install
sudo ldconfig /usr/local/lib
ffmpeg 对我来说工作得很好,假设你安装了 ffmpeg,这是很多视频播放器和转换器应用程序的基础。如果不是:
sudo apt install ffmpeg
在 ubuntu 和许多/大多数其他人上。 ——鲍勃·哈珀 我编写了它一次修复许多 webp 的脚本...... ---外壳代码--------------------------------
#!/bin/bash
对于 *.webp 中的文件;做
ffmpeg -i "$file" "${file/.webp}".jpg
完成
对于 *.WEBP 中的文件;做
ffmpeg -i "$file" "${file/.WEBP}".jpg
完成
echo "========================================"
ls -als *.jpg
echo "========================================"
---end-code-------------------------------------