views:

1954

answers:

4

I'm using a mac and looking to batch convert a large amount of eps files and create jpg previews of each. I'm looking for preferably a command-line utility, or some type of workflow to easily batch a large number of files.

Thanks for any ideas or input

+2  A: 

ImageMagick should be exactly what you're looking for. Once you have it installed, just use the convert utility:

convert file.eps -resize 25% preview.jpg  # create jpg thumbnail at 25% size
Adam Rosenfield
+1  A: 

On OS X, you can use sips to perform image processing tasks, like thumbnailing. It should support EPS. If it doesn't, as Adam recommended there is ImageMagick's convert.

codelogic
+1  A: 

Like codelogic mentioned, sips is a good tool for this. However, it doesn't support EPS natively, so you need to convert to PDF first.

If you're on Tiger or Leopard, something like the following should work:

mkdir pdf jpg

cd pdf
echo ../eps/*.eps | xargs -n1 pstopdf
cd ..


sips -s format jpeg *.pdf --out jpg/

Assuming your EPS files are in the current directory, this will first convert them all to pdf, storing them in the pdf/ directory, then convert each PDF to a JPEG file in the jpg/ directory.

Ben Alpert
thanks soprano,this is exactly what I was looking for, only problem I'm having is how to write out the jpg to have the same name as the incoming pdf. can't seem to use the wildcard in the --out param
Ronn
I'm not sure quite what you mean. It should make a file with the same basename in the jpg/ directory.
Ben Alpert
sips -s format jpeg *.pdf --out jpg/ would not work for me unless I specifically gave --out a filename, like whatever.jpg, otherwise I would get an error saying out_dir_not_found
Ronn
A: 

works beautifully...had to select a different directory to output the jpgs though, used /Users/(my username)/(simple folder name)

Silky