For the last very many years I have successfully used:
convert file.jpg file.eps
Please help.
For the last very many years I have successfully used:
convert file.jpg file.eps
Please help.
Long story short, a bunch of security bugs were discovered in Ghostscript that allowed a malicious file containing Postscript (i.e. PDF, PS, EPS, etc.) to break out of the security sandbox and exploit your computer.
Because so many web apps are likely to blindly pass stuff to ImageMagick, they locked it down so, by default, it doesn't invoke Ghostscript anymore.
Here's an adapted version of the solution from this question which is probably what ImageMagick was using:
gs -sDEVICE=eps2write -o file.eps viewjpeg.ps -c '(file.jpg)' viewJPEG
However, I'd be careful about using it. It's sort of like running a shell script in that you need to be careful about escaping on the input.
It'd also decode and re-encode the JPEG resulting in generation loss and requiring more CPU and memory for large images.
I'd suggest using img2pdf for the initial stage and then pdftops
for going from PDF to EPS. img2pdf is specifically designed to be a lossless conversion, unlike the approach ImageMagick and Ghostscript use.
This should do the trick:
img2pdf --output file.pdf file.jpg
pdftops -f 1 -l 1 -eps file.pdf file.eps
This problem has been solved by a software update, and convert file.jpg file.eps
now works successfully.
You can also open the .jpg file in GIMP image editor instead. This method also worked 3 weeks ago before the recent software update. GIMP can convert .jpg files to any of its supported image formats including .eps. To install GIMP run sudo apt install gimp
The Save option in GIMP saves a snapshot of the state of the file that you are working on that can be reopened to continue working on the same file later. In order to save the image itself in GIMP use either File -> Export or you can overwrite the input file with File -> Overwrite.
Export
vs.Save
can get confusing if you're not used to it.) – ssokolow Feb 15 '20 at 10:01