Wednesday, May 4, 2011

How to convert color EPS figures to grayscale?

Some journals still will not let you use color figures without extracting a ransom.

This is a problem because other than print versions of journal articles, all other fora (presentations, webpages, posters, online journal articles) in which figures are presented, are color-agnostic.

In fact, there it is often desirable to present things in color.

I recently found a GPLed perl tool pscol which lets you quickly make grayscale versions of color EPS figures. You can easily weave it into a shell script to make grayscale versions of an entire directory of color EPS figures, very quickly.

The usage is very simple:
pscol [flags] infilename outfilename
Allowed flags are:

-h print this message and exit.
-gray convert RGB colorscale to grayscale.
-0gray convert RGB colorscale to grayscale (simple).
-cmyk convert RGB to CMYK.
For simple files the results are decent, for example:



Anonymous said...

simplest solution is to use AdobePDFreader and use print command with printInGrayScale checked.

Sachin Shanbhag said...

Sure that would work. But if you had to convert 10 or 10,000 images, then having a command line option is useful.