【问题标题】:imagemagick wmf support on Alpine LinuxAlpine Linux 上的 imagemagick wmf 支持
【发布时间】:2021-11-03 21:29:54
【问题描述】:

我正在 Alpine 上安装 imagemagick,它选择了 7.0.10 版本的 imagemagick。

我的主要用途是将 WMF 转换为 PNG。 但是convert 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,但没有解决问题。

identify -list format | grep WMF 不返回任何结果。

【问题讨论】:

  • 我已经更新了我的答案 - 请再看看。

标签: imagemagick alpine


【解决方案1】:

更新答案

你很幸运! 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 的包和版本。

【讨论】:

    猜你喜欢
    • 2023-03-20
    • 1970-01-01
    • 2023-03-16
    • 2011-12-09
    • 1970-01-01
    • 2017-10-23
    • 1970-01-01
    • 2013-06-26
    • 1970-01-01
    相关资源
    最近更新 更多