gpt4 book ai didi

Alpine Linux 上的 imagemagick wmf 支持

转载 作者:行者123 更新时间:2023-12-02 02:00:12 25 4
gpt4 key购买 nike

我正在 Alpine 上安装 imagemagick,它会安装 7.0.10 版本的 imagemagick。

我的主要用途是将 WMF 转换为 PNG。但是转换sample.wmf Sample.png给出错误

convert: no decode delegate for this image format `WMF' @ error/constitute.c/ReadImage/572.
convert: no images defined `sample.png' @ error/convert.c/ConvertImageCommand/3322.

根据 https://www.imagemagick.org/script/formats.php ,我还安装了libwmf,但没有解决问题。

识别-列表格式| grep WMF 不返回任何结果。

最佳答案

更新答案

你很幸运! GraphicsMagick 可以在 alpine:latest 上实现:

apk add graphicsmagick

gm identify -version
GraphicsMagick 1.3.36 20201226 Q16 http://www.GraphicsMagick.org/
Copyright (C) 2002-2020 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.

Feature Support:
Native Thread Safe yes
Large Files (> 32 bit) yes
Large Memory (> 32 bit) yes
BZIP no
DPS no
FlashPix no
FreeType yes
Ghostscript (Library) no
JBIG no
JPEG-2000 no
JPEG yes
Little CMS no
Loadable Modules yes
Solaris mtmalloc no
Google perftools tcmalloc no
OpenMP no
PNG yes
TIFF yes
TRIO no
Solaris umem no
WebP yes
WMF yes <--- HERE IT IS
X11 no
XML yes
ZLIB yes

现在将 WMF 转换为 PNG:

gm convert sample.wmf result.png

原始答案

我不认为你能够做到这一点,至少使用 ImageMagick...

我尝试在 alpine:latest 上安装 libwmf,然后从源代码安装 ImageMagick,但它拒绝使用 libwmf > v0.2.12

所以我检查了 ImageMagick 需要什么,它需要 libwmf v0.2.8.2。

所以我尝试了alpine:3.8,它可以安装libwmf v0.2.8.4,但ImageMagick仍然不接受(xxx/ipa.h 丢失)。

所以我回顾了 alpine:3.3alpine:3.4,它们没有 libwmf

所以我尝试了 alpine:3.5 ,它与 alpine:3.8 的 libwmf 版本相同

TLDR; alpine:3.5 的 libwmf 对于 ImageMagick 来说太新了,而 alpine:3.4 根本没有 libwmf .

注意:我在 this 上找到了 libwmf 的软件包和版本网站。

关于Alpine Linux 上的 imagemagick wmf 支持,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69080507/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com