Extract image data from EPS

I have an encapsulated PostScript file that only appears to terminate the image file; file here .

Is there a tool to extract image data from it?

+3


source to share


2 answers


"convert" will use ghostscript to render eps and then continue rendering the bitmap; this makes it difficult to return the original image, in most cases you get a resampled image.

I understand that you want the image to be at its original resolution. I have no direct route for you. However, you can use pdfimages to get images from PDFs. Assuming you are running this on a Linux box (or with cygwin)

ps2pdf file.eps
pdfimages file.pdf basename

      

This gives you a basename.pnm or basename.ppm file. Use convert to go to jpeg or png. If you had a lossy format (jpg) to .eps, this would recode the jpg, so some additional loss is inevitable.



convert basename.pnm file.jpg

      

or

convert basename.ppm file.png

      

ps The file from the question is no longer available. However, this answer may still be of interest to others.

+2


source


ImageMagick can do this:

convert file.eps file.jpg

      

or you can do



convert file.eps file.png
convert file.eps file.tif

      

ImageMagick is available here .

example image

0


source







All Articles