Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using Linux. I want to convert an eps file to jpeg file. I find that I can use "convert" command. However, the resulting image looks very small. I want to enlarge the jpeg file by -resize option. It seems not to work. The resulting image is a pure black one. Does anyone have the same problem?

Here are more details:

  1. If I use:

    convert -scale 1000x1000 your.eps your.jpg

    The resulting image looks like a low quality image. The eps vector image is not scaled properly.

  2. If I use:

    convert -geometry 300% your.eps your.jpg

    I get a pure black image.

Here is my phf file:

and my eps file:

share|improve this question

migrated from Sep 15 '10 at 10:26

This question came from our site for professional and enthusiast programmers.

I can't see the files at those URLs. The service asks me to sign up or something. – reinierpost Nov 15 '10 at 9:52
My guess is that the EPS is a bitmap already. – reinierpost Nov 15 '10 at 9:53

Updated: This should work (-flatten did the trick for me)

convert -geometry 110% your.eps -flatten your.jpg
share|improve this answer
I did that. But the resulting image looks very bad. It seems not properly scaled. Since eps file is a vector image, it should be able to scale very well. – Anand Sep 15 '10 at 8:11
My test-eps file scales just fine. Care to upload your eps somewhere? – aioobe Sep 15 '10 at 8:13
it still doesn't work with -resample 100. Sorry :-( – Anand Sep 15 '10 at 8:24
Could you upload your eps somewhere? – aioobe Sep 15 '10 at 8:25
I want to upload somewhere. Do you have any recommendations on where I can upload? Thank you Aioobe. :-) – Anand Sep 15 '10 at 8:37

I would use ghostscript:

gs -dNOPAUSE -r300 -sDEVICE=jpeg -sOutputFile=<output.jpg> <input.eps>
share|improve this answer
Thanks Curd, it generate an A4 page with large margins. If I trimmed them off, it becomes again a small image. – Anand Sep 15 '10 at 8:46

You have to set desired resolution (in dpi) before reading a file, for example:

convert -density 600x600 your.eps -quality 85 your.jpg

If you need to resize it to particular resolution then read in high density and then resize:

convert -density 1200x1200 your.eps -scale 1000x1000 -quality 85 your.jpg
share|improve this answer

Inkscape can convert Encapsulated PostScript into PNG data:

inkscape -D -e "$OUPUT_PNG" -h "$HEIGHT_PX" -w "$WIDTH_PX" "$INPUT_EPS"
share|improve this answer
Thanks Amphetamachine, I tried. But it doesn't work. Here is my file: – Anand Sep 15 '10 at 8:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .