Imagemagick on linux to convert EMF to PNG
Asked Answered
B

4

13

I am trying to convert an image in EMF format to PNG using Imagemagick on Red Hat Enterprise Linux Server release 5.5 (Tikanga), but I am running into the following error:

convert: no decode delegate for this image format `thumbnail.emf' @ error/constitute.c/ReadImage/550. convert: no images defined `1.png' @ error/convert.c/ConvertImageCommand/3068.

How might I fix this?

Buttermilk answered 25/2, 2013 at 9:3 Comment(1)
Try libreoffice first and then imagemagick as I wrote in this answer.Coldiron
M
5

According to this page: http://www.imagemagick.org/script/formats.php

EMF R Microsoft Enhanced Metafile (32-bit) Only available under Microsoft Windows.

Malefaction answered 25/2, 2013 at 12:39 Comment(0)
F
19

Install libreoffice and run this command on the folder where your emf files are located:

libreoffice --headless --convert-to png *.emf
Fronia answered 26/2, 2015 at 18:10 Comment(0)
C
11

Another way is to use inkscape:

inkscape -o file.png source.emf

See inkscape --help for more export options (area to export, dpi, image resolution, background color etc).

Copro answered 26/7, 2016 at 12:10 Comment(4)
Not imagemagick, but it works. Can also do svg, (e)ps, pdf and LaTeX.Flounce
This worked for me in spite of @ArnaudWeil's comment.Auxin
Maybe MS does put whatever they want into EMF... "** (inkscape:10912): WARNING **: Specified document image5.emf cannot be opened (does not exist or not a valid SVG file)"Vergne
inkspace -o file.png -d 300 source.emf (options have changed)Lamarckism
M
5

According to this page: http://www.imagemagick.org/script/formats.php

EMF R Microsoft Enhanced Metafile (32-bit) Only available under Microsoft Windows.

Malefaction answered 25/2, 2013 at 12:39 Comment(0)
I
0

libreoffce will output a png that is a different size than the original image. I used inkscape instead. The arguments have changed (works as of 2024):

inkscape -z -f image16.emf -e image16.png
Indomitability answered 21/2 at 21:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.