How can I convert a .jpg image to an .eps?
7 Answers
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.
-
I ever wrote a small webpage to convert images to EPS for myself: JPG to EPS converter . This may help others without a Linux aside.– ericzmaNov 15, 2012 at 3:14
If you just want to convert an image or two to eps - use an online utility...
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.
if the question involves postscript the answer is generally ghostscript / ghostview
I use online converter:
http://www.online-utility.org/image_converter.jsp?outputType=EPS
gimp is a great tool for converting files to other popular formats - http://www.gimp.org
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
.