39

I need to convert a PNG file to an EPS file. Various sources on the Web refer to the convert command on macOS, but that program does not appear to exist on macOS High Sierra.

How do I get it?

Nimesh Neema
  • 51,809

4 Answers4

69

There is no command/utility named convert built into macOS.

convert utility is installed as part of ImageMagick. You can easily install ImageMagick using Homebrew by running:

brew install imagemagick

You can install Homebrew, using the command-line as mentioned here:

Nimesh Neema
  • 51,809
  • 1
    Before that you might need to run this command xcode-select --install – bartektartanus Oct 15 '21 at 15:38
  • 1
    For anyone that goes to Imagemagick's site, on the downloads screen under Mac OSX Binary Release they say "Imagemagick depends on Ghostscript fonts. To install them, type: brew install ghostscript". This is not necessary, brew install imagemagick automatically installs it. – Mike Ciffone Nov 17 '21 at 20:41
4

Once installed using @Nimesh Neema's answer you can find the location of the command by running

which convert
user7886229
  • 10,009
3

There used to be a utility in MacOS at:

/System/Library/Printers/convert 

but it was removed some time ago, probably around Lion.

However, it was just a symlink to the cupsfilter command (though curiously it presented different flag options).

You can still use the cupsfilter command to convert to file types that MacOS understands, using their MIME type. The problem is that PostScript and Encapsulated PostScript share the same MIME type (application/postscript), and cupsfilter only outputs PostScript, rather than EPS.

EPS is a specific type of PS file, conforming to certain syntax conventions, designed for use as portable image files.

benwiggy
  • 35,635
0

MAMP / MAMP PRO

If you use MAMP / MAMP Pro, you have to activate the option (checkbox) in PHP tab, 'Extensions' -> Imagick / ImageMagick

And you can find binary here :

/Applications/MAMP/Library/bin/convert

ReaperSoon
  • 101
  • 1
  • This version of convert is dynamically linked and I think not easy to extract and run it outside MAMP. – lhf Oct 07 '21 at 13:57
  • For a statically linked convert, see MacTeX-2013: http://ftp.math.utah.edu/pub/tex/historic/systems/mactex/2013/mactexadditions20130618.pkg. Open it with unpkg and find a statically linked convert at mactexadditions20130618/local/bin/convert. It's a 32-bit binary; it'll run in High Sierra and Mojave but not in Catalina and later. – lhf Oct 07 '21 at 13:59
  • See also https://imagemagick.org/script/download.php#macosx for the official binary – lhf Oct 07 '21 at 14:01