Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert svg to eps using Imagemagick?

I am trying to convert svg image to eps using Imagemagick. I am able to convert the image using Imagemagick, but the image size is too high when compared to the original image size and the content is not displayed correctly compared to the svg.

like image 702
user1417638 Avatar asked Dec 04 '12 06:12

user1417638


1 Answers

I was just wondering this too. However, it appears that Imagemagick might not be the best tool to do this.

Imagemagick is a "raster image processor," but SVG and EPS are vector formats. So using Imagemagick will cause those images to lose information as it has to convert from a vector format, to a raster format, and then back to vector. This probably explains why the contents of your image aren't correctly displayed.

Maybe consider using Inkscape to do this conversion using the following

# Works as of Version 0.92.4
inkscape ing.svg \
    -E out.eps \
    --export-ignore-filters \
    --export-ps-level=3

where the -E flag is short for --export-eps to export EPS files.

Source:

  • http://imagemagick.org/Usage/formats/#vector
  • https://stackoverflow.com/a/30539923/6873133
like image 51
Eric Leung Avatar answered Sep 28 '22 08:09

Eric Leung