Convert emf to PNG image using command line

12,103

Solution 1

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

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

Source

Solution 2

(Found in https://stackoverflow.com/a/28749719)

Use LibreOffice:

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

Solution 3

The other answers here did not work for me, but one I found on stakoverflow did

Another way is to use inkscape:

inkscape -e file.png source.emf

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

Share:
12,103
om39a
Author by

om39a

Updated on September 18, 2022

Comments

  • om39a
    om39a over 1 year

    Is there any command line tool available to convert emf to png images?

    I tried the convert utility from ImageMagick, but it says

    decoder for emf not found
    
  • Jetson Earth
    Jetson Earth almost 6 years
    Care to explain the downvotes?
  • Pierre.Sassoulas
    Pierre.Sassoulas over 4 years
    I did not downvote but it's annoying to have an accepted answer with information that do not help to solve the problem and only partially answer the question when there is two answers that do below.
  • Alessandro Cuttin
    Alessandro Cuttin about 4 years
    --convert-to pdf is also allowed!
  • Alessandro Cuttin
    Alessandro Cuttin about 4 years
    may require cropping after the conversion, though
  • bcag2
    bcag2 over 3 years
    works fine under Bionic with inkscape v0.92.3