Specify eps2 target format, as in convert xxx.jpg eps2:xxx.eps
this is equal to or even better than jpeg2ps, though viewed poorly in gv du to a fault in ghostscript's screen renderer.
Newsgroups: comp.text.tex Date: 2001-09-06 17:33:30 PST
> Merz) I, sometimes, obtain very bad results.
From what I know, jpeg2ps only wraps the jpeg in a PostScript Level2 decompression programme. What doe you mean with `obtain very bad results' ?
Sven
> In fact the eps file is less good than the jpeg file. But the > result is acceptable. But when I visualise the ps file whith > ghostscript I loose again quality. And this time the result > become unacceptable. > I don't have a printer near me, so I can't tell you if the > result is good when I print the document.
It will be good when you print it.
> My image is a curve and my problem is that I have > unwanted point near the curve. Moreover the image contain > text and when I visualise it with ghostscript, it becomes > very ugly.
Yes, but that is a fault in ghostscript's screen renderer.
Magnus
> My image is a curve and my problem is that I have > unwanted point near the curve. Moreover the image contain > text and when I visualise it with ghostscript, it becomes > very ugly.
Please, _never_ use lossy compression (which jpg usually is) with text or line drawings. I have severe doubts the jpg image was anywhere near good quality before converting (you can of course prove me wrong by privately emailing me the original jpg as an email attachment).
Use png, or even better, save directly to (non-bitmapped) eps or pdf.
Stephan
David Kastrup writes:
> >> When I create an eps file > >> from a jpeg file thanks to jpeg2ps (V1.8 from Thomas >Merz) I, > >> sometimes, obtain very bad results. >Is there another soft > >> which produce good results ? > >> > >> I've used xv with good results. > >> > >> You might also try the "convert" program that comes with > >> ImageMagik. > > Sven> But the resulting eps file will be much bigger, up to 2500% > Sven> (jep, that's right, 25 times) the size you would get with > Sven> jpeg2ps. > > Specify eps2 target format, as in > convert xxx.jpg eps2:xxx.eps
Indeed!
kogs12>/home/utcke% convert zug1.jpg zug1-convert1.eps kogs12>/home/utcke% convert zug1.jpg eps2:zug1-convert2.eps kogs12>/home/utcke% jpeg2ps zug1.jpg > zug1-jpeg2ps.eps Note on file 'zug1.jpg': 1024x685 pixel, 3 color components kogs12>/home/utcke% ls -l zug1* -rw-r--r-- 1 utcke tvp 4892610 Sep 14 14:02 zug1-convert1.eps -rw-r--r-- 1 utcke tvp 120886 Sep 14 14:02 zug1-convert2.eps -rw-r--r-- 1 utcke tvp 122245 Sep 14 14:02 zug1-jpeg2ps.eps -rw-r--r-- 1 utcke tvp 95599 May 19 2000 zug1.jpg
As I now see, this is even better than jpeg2ps! I didn't know …
Sven
: As I now see, this is even better than jpeg2ps! I didn't know convert : could do this at all.
I tried this on two randomly chosen jpg files and jpeg2ps gave file sizes less than a fifth the size of the convert/eps2 files. I am sticking to jpeg2ps, warts and all.
Chris Boyd
Sven> As I now see, this is even better than jpeg2ps! I didn't know convert Sven> could do this at all. Does it also work for tiff (instead of Sven> tiff2ps), gif (instead of gifconv) and png (instead of bmeps, which Sven> only works half of the time anyway)?
Cough cough. You posted the above results, didn't you? It seems that you are perfectly available of trying this out faster than it takes to post to a newsgroup.
Sven> What format would I need to specify?
eps2.
One note of caution, though: I believe that convert uses an encoding where % signs may appear in the first column as part of data. That may or may not confuse dvips and/or ghostscript.
David Kastrup
I discovered, painfully, that you *must* use the jpeg2ps -h switch, to produce hex-encoded .ps (or .eps) files for use with LaTeX. Otherwise, the .ps output sometimes includes lines starting with a '%' char, and your image gets mangled.
Unfortunately, this makes increases the size of the .ps file.
Michael Friendly
> Unfortunately, this makes increases the size of the .ps > file.
Not that much, though. Where size is relevant, you'll compress Postscript with some file compressor, anyhow, and the entropy of the hex encoded file is the same as of the ASCII85 encoded one, so after compression you'll hardly notice a difference.
David Kastrup