15

How can I convert a .jpg image to an .eps?

slhck
  • 223,558
  • 70
  • 607
  • 592

7 Answers7

14

ImageMagick can do this.

From the commandline, simply type:

convert filename.jpg filename.eps

(On Windows you may need to put in the full path to convert.exe inside quotation marks; the above will work as-is on OS X or linux.)

It doesn't really make any sense to convert a raster graphic to a vector graphic, however. It'll still be rasterized.


Another way of doing it with a GUI would be to use Inkscape; I'm pretty sure it can import most formats, and it definitely can export to .eps — it does have some ways of trying to trace paths in a vector image to recreate the vectors, but it's far from failsafe.

Just be sure to "embed" rather than "link" when you import.

slhck
  • 223,558
  • 70
  • 607
  • 592
frabjous
  • 10,755
  • 3
  • 34
  • 27
  • I ever wrote a small webpage to convert images to EPS for myself: [JPG to EPS converter](http://www.fclose.com/t/jpg2eps/) . This may help others without a Linux aside. – ericzma Nov 15 '12 at 03:14
1

If you just want to convert an image or two to eps - use an online utility...

Convert Image To EPS

0

The best solution I know for something that runs locally, is lossless, and performs well is to take the output of img2pdf and feed it to pdftops from Poppler (poppler-utils on Debian-family distros).

img2pdf is specifically designed for converting one or more images into a one-image-per-page PDF file in a lossless fashion (ImageMagick and Ghostscript will decode and re-encode JPEGs, which is lossy) and, since both formats are Postscript-based, it shouldn't need to be re-transcoded in the move from PDF to EPS.

The conversion would looks like like:

img2pdf --out filename.pdf filename.jpg
pdftops -f 1 -l 1 -eps filename.pdf filename.eps
rm filename.pdf

The -f 1 and -l 1 specify the first and last page to convert, and are both required to be 1 when using -eps.

ssokolow
  • 951
  • 10
  • 10
0

If you just want the jpeg image contained in the .eps file (and not vectorized), try this code

http://code.google.com/p/sam2p/

It's C++ source, and takes several image formats and puts them inside a compliant .eps file as an embedded image.

0

if the question involves postscript the answer is generally ghostscript / ghostview

Martin Beckett
  • 9,753
  • 1
  • 27
  • 28
0

I use online converter:

http://www.online-utility.org/image_converter.jsp?outputType=EPS

Alex G
  • 958
  • 2
  • 8
  • 21
0

gimp is a great tool for converting files to other popular formats - http://www.gimp.org

LinuxUser
  • 169
  • 3