Skip to content

Instantly share code, notes, and snippets.

@juandesant
Last active January 2, 2016 17:59
Show Gist options
  • Save juandesant/8340908 to your computer and use it in GitHub Desktop.
Save juandesant/8340908 to your computer and use it in GitHub Desktop.
Bash shell function to convert EPS and PS files in JPEG using sips (Mac OS X-specific)
function eps2jpeg {
for i in $*
do
filefolder=`dirname $i`
filename=`basename $i`
tmppdf="/tmp/`uuidgen`.pdf"
ps2pdf $i $tmppdf
sips -s format jpeg $tmppdf --out "$filefolder/$filename.jpg"
rm $tmppdf
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment