Loading...
X

Error “convert: delegate failed `’potrace’ --svg --output ‘%o’ ‘%i” @ error/delegate.c/InvokeDelegate/1911” (SOLVED)

Scalable Vector Graphics (SVG) is an XML-based vector image format for defining two-dimensional graphics, having support for interactivity and animation. The SVG specification is an open standard developed by the World Wide Web Consortium (W3C) since 1999.

SVG images are defined in a vector graphics format and stored in XML text files. SVG images can thus be scaled in size without loss of quality, and SVG files can be searched, indexed, scripted, and compressed. The XML text files can be created and edited with text editors or vector graphics editors, and are rendered by the most-used web browsers.

On the Linux command line, images can be converted to SVG format using the utilities included in the ImageMagick (the package is called “imagemagick”). In addition to installing imagemagick, Arch Linux and derivative distributions must have the “librsvg” package installed to support the SVG format.

Converting to SVG format is done with a command like:

convert INPUT.jpg OUTPUT.svg

INPUT.jpg can be any image file instead.

You can also use the “magick” command:

magick INPUT.pdf OUTPUT.svg

When using the previous commands, you may encounter an error:

convert: delegate failed `'potrace' --svg --output '%o' '%i'' @ error/delegate.c/InvokeDelegate/1911.

Or an error:

magick: delegate failed `'potrace' --svg --output '%o' '%i'' @ error/delegate.c/InvokeDelegate/1911.

The error occurs because when converting images to SVG format, ImageMagick utilities rely on Potrace, which is not a default dependency for ImageMagick and is not installed with this package on Debian (and all derivative distributions) or Arch Linux (and derivative distributions).

To fix this error, just install the “potrace” package, this can be done with one of the following commands.

  • On Debian and derivative distributions (Ubuntu, Linux Mint, Kali Linux and others):
sudo apt install potrace
  • On Arch Linux and derivative distributions (Manjaro, BlackArch and others):
sudo pacman -S potrace
  • On macOS:
brew install potrace

As you can see, after installing potrace, the conversion from JPG to SVG format was successful:


Leave Your Observation

Your email address will not be published. Required fields are marked *