ImageMagick convert and eps
I'm trying to compile a \LaTeX document. As you know, \LaTeX wants images in .eps format. I naively attempted to use convert to convert my jpgs to eps format, but I'm having a weirdness. The image dimensions change randomly, and the file size gets inflated like 10x in some cases.
Code:
chaz@optimus:~/docs/teX/robot/jpgs$ ls |
It's been a while since I've worked with it but my notes show ImageMagick comes with a command called "mogrify" that lets you specify sizes:
For example: mogrify -resize "60x88" image.png One thing I noticed at the time was that it made the resulting image 60x25 because it kept the original ratios on image size which is what I really wanted. I haven't worked on eps files but did want to mention this as at the time I kept looking for a "resize" command and it took me a bit of work to figure out mogrify was what I really needed. |
The thing is I'm NOT trying to resize anything. I just used convert, which should have just converted the format. The odd thing is that some images were resized and some weren't. I understand that a .eps file could be bigger than a .jpg due to the format, compression, etc but I didn't expect 200k to 6M disk usage inflation.
Is there some other tool for making this conversion, or am I using this wrong? |
Hi,
this is not really an answer to the question you posted, but a possible different approach. Have you considered using pdflatex? pdflatex will let you use \includegraphics{} png, jpg, pdf and many more. Instead of producing a dvi output file it produces a pdf. If you also have ps/eps input images that you \includegraphics{} you can convert them to pdf (ps/eps -> pdf conversion using epstopdf is quite clean). I switched from using latex/dvips/dvipdf to pdflatex about 5 years ago and have never looked back. HTH, Evo2. |
I have considered it. I assumed I would need to do some things to "port" my source to use pdflatex. If not, I guess there's really no disadvantage. I will try to compile my existing documents with pdflatex and see what happens.
|
Quote:
|
Hi,
Quote:
Quote:
Cheers, Evo2. |
So you would compress the file by sizing it down and then back up?
That might work but I use mogrify -compression jpeg -quality 50 to compress file size without scaling down. By the way, I compressed my starting jpegs down about 50% in file size and re-converted to EPS. There was no difference in the size of the resulting EPS files. EPS files are just big! Also, identify does not report EPS files size sensibly. EPS might not even have the property of size, for all I know. |
All times are GMT -5. The time now is 12:23 PM. |