Linux 上的 Imagemagick 将 EMF 转换为 PNG

问题描述 投票:0回答:4

我尝试在 Red Hat Enterprise Linux Server 版本 5.5 (Tikanga) 上使用 Imagemagick 将 EMF 格式的图像转换为 PNG,但遇到以下错误:

转换:此图像格式“thumbnail.emf”没有解码委托@ error/constitute.c/ReadImage/550。 转换:没有定义图像“1.png”@ error/convert.c/ConvertImageCommand/3068。

我该如何解决这个问题?

image-processing imagemagick libreoffice
4个回答
17
投票

安装 libreoffice 并在 emf 文件所在的文件夹中运行此命令:

libreoffice --headless --convert-to png *.emf

11
投票

另一种方法是使用 inkscape:

inkscape -o file.png source.emf

请参阅

inkscape --help
了解更多导出选项(导出区域、dpi、图像分辨率、背景颜色等)。


5
投票

根据此页面:http://www.imagemagick.org/script/formats.php

EMF R Microsoft 增强型图元文件(32 位)仅在 Microsoft Windows 下可用。


0
投票

libreoffce 将输出一个与原始图像大小不同的 png。我用 inkscape 代替。参数已更改(自 2024 年起有效):

inkscape -z -f image16.emf -e image16.png
© www.soinside.com 2019 - 2024. All rights reserved.